| commit | a7aa0766f0a5395951ef8dbe847e2c33797d414f | [log] [tgz] |
|---|---|---|
| author | geekman <darell.tan@gmail.com> | Mon Mar 18 23:12:46 2024 +0800 |
| committer | GitHub <noreply@github.com> | Mon Mar 18 15:12:46 2024 +0000 |
| tree | 1066de31958fe9624bca745fef2183fba3344b5f | |
| parent | b09854c63959399ad9c8290f6db6b0b76e21a9f0 [diff] |
Make target reset functionality work out-of-the-box (#123) * Fix up target reset functionality. - Correct GPIO direction logic error in `probe_assert_reset` - Remember to de-assert nRESET on deinit * board_pico_config: use pin 1 for reset This pin is normally used for UART debug output, but that is undocumented. Repurpose it as reset output. Signed-off-by: Sean Cross <sean@xobs.io> * main: move stdio_uart_init() before DAP_Setup() When using GP1 as a reset line, this is necessary to overwrite the stdio function call from reusing the pin as a debug output. Signed-off-by: Sean Cross <sean@xobs.io> --------- Signed-off-by: Sean Cross <sean@xobs.io> Co-authored-by: Sean Cross <sean@xobs.io>
Firmware source for the Raspberry Pi Debug Probe SWD/UART accessory. Can also be run on a Raspberry Pi Pico.
Raspberry Pi Debug Probe product page
Raspberry Pi Pico product page
Debug Probe documentation can be found in the Pico Getting Started Guide. See “Appendix A: Using the Debug Probe”.
For the purpose of making changes or studying of the code, you may want to compile the code yourself.
First, clone the repository:
git clone https://github.com/raspberrypi/debugprobe cd debugprobe
Initialize and update the submodules:
git submodule update --init
Then create and switch to the build directory:
mkdir build cd build
If your environment doesn't contain PICO_SDK_PATH, then either add it to your environment variables with export PICO_SDK_PATH=/path/to/sdk or add PICO_SDK_PATH=/path/to/sdk to the arguments to CMake below.
Run cmake and build the code:
cmake .. make
Done! You should now have a debugprobe.uf2 that you can upload to your Debug Probe via the UF2 bootloader.
If you want to create the version that runs on the Pico, then you need to invoke cmake in the sequence above with the DEBUG_ON_PICO=ON option:
cmake -DDEBUG_ON_PICO=ON ..
This will build with the configuration for the Pico and call the output program debugprobe_on_pico.uf2, as opposed to debugprobe.uf2 for the accessory hardware.
Note that if you first ran through the whole sequence to compile for the Debug Probe, then you don't need to start back at the top. You can just go back to the cmake step and start from there.