From c232c736e97d0552456c1fbb1a9598aec71b4e0d Mon Sep 17 00:00:00 2001 From: Robin Davies Date: Tue, 21 Mar 2023 15:46:18 -0400 Subject: [PATCH 1/3] Add debug commandline and launch.json file info. --- docs/Debugging.md | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/docs/Debugging.md b/docs/Debugging.md index 366bbec..5c4f896 100644 --- a/docs/Debugging.md +++ b/docs/Debugging.md @@ -117,5 +117,47 @@ Or you can avoid all of this, by configuring the debug instance to use a data fo ... } +Run pipedald in a debugger, you need to use the following command-line to launch pipedal: + + build/src/pipedald /etc/pipedal/config /etc/pipedal/react -port0.0.0.0:8080 + +The first argument specifies where the pipedal daemon's configuration files are. The second argument specifies where +built static web pages for the web application are. And the port option specifies the port on which the daemon will +listen. If you are using a React debug server to serve up the web appliation you will point your browser at the +React debug server on port 3000; but the web application will still need to connect to web sockets on the 8080 port. + +If you are using Visual Studio Code, you might find it useful to add the following section to your `.vscode/launch.json` file: + + { + ... + { + "name": "(gdb) pipedald", + "type": "cppdbg", + "request": "launch", + // Resolved by CMake Tools: + "program": "${command:cmake.launchTargetPath}", + "args": [ "/etc/pipedal/config", "/etc/pipedal/react", "-port", "0.0.0.0:8080" ], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [ + { + // add the directory where our target was built to the PATHs + // it gets resolved by CMake Tools: + "name": "PATH", + "value": "$PATH:${command:cmake.launchTargetDirectory}" + } + ], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + }, + ... + } ----- -[<< The Build System](TheBuildSystem.md) | [Up](Documentation.md) | [PiPedal Architecture >>](Architecture.md) \ No newline at end of file +[<< The Build System](TheBuildSystem.md) | [Up](Documentation.md) | [PiPedal Architecture >>](Architecture.md) From 73bc674a7fa2c00963c5075792eac2ebf0a00ca1 Mon Sep 17 00:00:00 2001 From: Robin Davies Date: Wed, 22 Mar 2023 08:09:48 -0400 Subject: [PATCH 2/3] Reboot required after group membership change. --- docs/Debugging.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/Debugging.md b/docs/Debugging.md index 5c4f896..f4591b9 100644 --- a/docs/Debugging.md +++ b/docs/Debugging.md @@ -108,6 +108,9 @@ You will need to add your userid to the pipedal_d group if you plan to share the sudo usermod -a -G pipedal_d *youruserid* +You will need to reboot your machine to get the group membership change to take effect,or log out and log back +in if you can do that. + Or you can avoid all of this, by configuring the debug instance to use a data folder in your home directory. Edit `debugConfig/config.json`: From 1a4c72a269185c0df8d5b41a64a363e9b209e383 Mon Sep 17 00:00:00 2001 From: Robin Davies Date: Wed, 22 Mar 2023 09:18:32 -0400 Subject: [PATCH 3/3] Memory requirements. --- docs/BuildingPiPedalFromSource.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/BuildingPiPedalFromSource.md b/docs/BuildingPiPedalFromSource.md index b99b3f2..e960273 100644 --- a/docs/BuildingPiPedalFromSource.md +++ b/docs/BuildingPiPedalFromSource.md @@ -7,12 +7,9 @@ page_icon: img/Compiling.jpg PiPedal has only been tested on Raspberry Pi OS, and Ubuntu, but should run with little or no modification on most Linux distributions. Pull requests to correct problems with building PiPedal on other versions of Linux are welcome. -To build PiPedal, a Raspberry Pi 4B, with at least 4GB of memory is required (8GB recommended). You can build PiPedal from the command-line using CMake; but the project was originally build using -Microsoft Visual Studio Code. If you use VSCode, you will almost definitely need to hav 8GB of RAM. +To build and debug PiPedal using Visual Studio Code, you need 8GB of memory. You can build PiPedal with 2GB of memory. -You should also be able to cross-compile PiPedal easily enough, but we do not currently provide support on how to do this. Visual Studio Code provides excellent support for cross-compiling, and good support for remote -and cross-platform debugging, all of which should work with the PiPedal CMake build. In early development, PiPedal was built and debugged remotely on a Raspberry Pi, from a Windows desktop system. This should still -more-or-less work, although you may have to scramble a bit to install some of the build dependencies. +You should also be able to cross-compile PiPedal easily enough, but we do not currently provide support on how to do this. Visual Studio Code provides excellent support for cross-compiling, and good support for remote and cross-platform debugging, all of which should work with the PiPedal CMake build. However, management of ARM pakages on a Windows machine when cross-compiling is not great. Remote debugging may be a better path. -------- -[<< Which LV2 Plugins Does PiPedal Support?](WhichLv2PluginsAreSupported.md) | [Up](Documentation.md) | [Build Prerequisites >>](BuildPrerequisites.md) \ No newline at end of file +[<< Which LV2 Plugins Does PiPedal Support?](WhichLv2PluginsAreSupported.md) | [Up](Documentation.md) | [Build Prerequisites >>](BuildPrerequisites.md)