diff --git a/src/Debugger.md b/src/Debugger.md index 507cab6..959cd1b 100644 --- a/src/Debugger.md +++ b/src/Debugger.md @@ -227,48 +227,3 @@ _lf_invoke_reaction (env=env@entry=0x200018d0 , reaction=reaction@entry=0x At this point, the LED should have gone from off to on (or on to off, depending on its state when you connected gdb). -### Visual Studio Code - -Breakpoints can be placed in generated lingua franca project source code within **vscode**. -As a part of the code generation process, each lfc generates a ``.vscode`` directory in the program ``src-gen`` folder. -This is populated with settings to configure and run ``gdb``, ``openocd`` and ``cmake``. - -Run the following after generating code for the desired lf program: - -```bash -$ code src-gen/Blink/ -``` - -In vscode, navigate to the run and debug tab on the left. A **Pico Debug** option should appear at the top as shown here: - -Debugging in VSCode - -First, you will need for VS Code to build the project. Clean up from the previous `lfc` builds as follows: - -```bash -rm -rf src-gen/Blink/build -``` - -Then click on the blue `Build` button at the bottom of the VS Code window. - -Make sure the *picoprobe* is connected and wired as noted above and click run (the green triangle). The debugger should automatically break -at the ``main`` method of the application. Breakpoints can be visually inserted and other debugger options are accessible through -the IDE gui. - -**Troubleshooting:** Depending on the platform you are running on and how `gdb` was installed, you may see the following error when try to run the program: - -VS Code error screen - -Click on `Open 'launch.json'` and edit this line: - -``` - "gdbPath" : "gdb-multiarch", -``` - -This line specifies the `gdb` program to use. It may be simply: - -``` - "gdbPath" : "gdb", -``` - - diff --git a/src/Non-Nix.md b/src/Non-Nix.md index 8227cdd..57a4e67 100644 --- a/src/Non-Nix.md +++ b/src/Non-Nix.md @@ -21,6 +21,24 @@ $ echo "export PICO_SDK_PATH=$PICO_SDK_PATH" >> ~/.profile __Caution__: Depending on what operating system and terminal you use, and how it is configured, you may need to find some other way to set this environment variable. +### Robot Board Header +To support different pin configurations for rp2040 based boards, pico-sdk uses board header files found in `pico-sdk/src/boards/include/boards`. +When building binaries for boards other than the raspberrypi pico, `-DPICO_BOARD=` can be passed to the cmake command +where `` is the header name. + +The board header for the 3pi robot in the repo might not correctly map the uart pins. Modify `pololu_3pi_2040_robot.h` in the board header directory +to include the following lines: + +``` C +#ifndef PICO_DEFAULT_UART_TX_PIN +#define PICO_DEFAULT_UART_TX_PIN 28 +#endif + +#ifndef PICO_DEFAULT_UART_RX_PIN +#define PICO_DEFAULT_UART_RX_PIN 29 +#endif +``` + ## Install `picotool` To build and install `picotool` from source, run the following commands: diff --git a/src/Prerequisites.md b/src/Prerequisites.md index a599554..c0c817b 100644 --- a/src/Prerequisites.md +++ b/src/Prerequisites.md @@ -44,15 +44,11 @@ Please ensure that you have the following extensions installed: - `ms-vscode.cpptools` — [C/C++ IntelliSense, debugging, and code browsing](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) - `lf-lang.vscode-lingua-franca` — [Lingua Franca for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=lf-lang.vscode-lingua-franca) -For debugging support in VS Code: - - `marus25.cortex-debug` — [ARM Cortex-M GDB Debugger support for VSCode](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug) - To install them from the command line, run: ```bash $ code --install-extension ms-vscode.cmake-tools $ code --install-extension ms-vscode.cpptools $ code --install-extension lf-lang.vscode-lingua-franca --pre-release -$ code --install-extension marus25.cortex-debug ``` ## Permissions diff --git a/src/img/vscode-debug.png b/src/img/vscode-debug.png deleted file mode 100644 index fa70109..0000000 Binary files a/src/img/vscode-debug.png and /dev/null differ diff --git a/src/img/vscode-error.png b/src/img/vscode-error.png deleted file mode 100644 index 01d8727..0000000 Binary files a/src/img/vscode-error.png and /dev/null differ