added stock Pico SDK rp2040.cfg to enable flashing with picoprobe #64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The stock rp2040.cfg file is missing from the Zephyr fork of openocd. This prevents "west flash" from working using a PicoProbe (or a Pico set up as a PicoProbe). Zephyr will by default craft the following openocd command (replace gherlein with your own username):
/home/gherlein/zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/bin/openocd
-s /home/gherlein/zephyrproject/zephyr/boards/raspberrypi/rpi_pico/support
-s /home/gherlein/zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts
-f /home/gherlein/zephyrproject/zephyr/boards/raspberrypi/rpi_pico/support/openocd.cfg
-c 'source [find interface/cmsis-dap.cfg]'
-c 'transport select swd'
-c 'source [find target/rp2040.cfg]'
-c 'set_adapter_speed_if_not_set 2000'
'-c init'
'-c targets'
-c 'reset init'
-c 'flash write_image erase /home/gherlein/src/zephyr/blinky/build/zephyr/zephyr.hex'
-c 'reset run'
-c shutdown
That results in
This is because this repo lacks that file - it only has rp2040-core0.cfg. This patch copies the file from a working tree installed by the Raspberry Pi Pico SDK into zephyr-sdk-0.16.8/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts/target/ which then results in proper flashing using openocd via west.