Skip to content

Commit

Permalink
boards: raspberrypi: rpi_pico2: Tidy up OpenOCD configuration
Browse files Browse the repository at this point in the history
- Remove redundant `transport select swd`. This is already done in
  `interface/rp2350.cfg`
- Set the adapter speed to match Raspberry Pi's documentation.

Signed-off-by: Andrew Featherstone <[email protected]>
  • Loading branch information
ajf58 committed Sep 30, 2024
1 parent 045ed4a commit acb36e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions boards/raspberrypi/rpi_pico2/board.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ if ("${RPI_PICO_DEBUG_ADAPTER}" STREQUAL "")
endif()

board_runner_args(openocd --cmd-pre-init "source [find interface/${RPI_PICO_DEBUG_ADAPTER}.cfg]")
board_runner_args(openocd --cmd-pre-init "transport select swd")
board_runner_args(openocd --cmd-pre-init "source [find target/rp2350.cfg]")

# The adapter speed is expected to be set by interface configuration.
# But if not so, set 2000 to adapter speed.
board_runner_args(openocd --cmd-pre-init "set_adapter_speed_if_not_set 2000")
# The Raspberry Pi's OpenOCD fork doesn't, so match their documentation at
# https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html#debugging-with-swd
board_runner_args(openocd --cmd-pre-init "set_adapter_speed_if_not_set 5000")

board_runner_args(uf2 "--board-id=RP2350")

Expand Down

0 comments on commit acb36e4

Please sign in to comment.