I am trying to debug some code on a Raspberry Pi Pico W. I'm using PlatformIO. After some Issues with the OpenOCD version shipped with PlatformIO (Access Violations), which I fixed by replacing the OpenOCD with the version shipped with the Pico SDK I'm now facing the Issue that I'm here to ask about.
For some reason I get a error about two or more SWD non multidrop DAPs being not supported. I'm unable to find anything usable about this error online.
Here is the exact error message:
Error: Two or more SWD non multidrop DAPs are not supported
and here the wholeoutput:
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/raspberrypi/pico.html
PLATFORM: Raspberry Pi RP2040 (1.7.0) > Raspberry Pi Pico
HARDWARE: RP2040 133MHz, 264KB RAM, 2MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, jlink, raspberrypi-swd)
PACKAGES:
- framework-arduino-mbed @ 3.1.1
- tool-openocd-raspberrypi @ 2.1100.0 (11.0)
- tool-rp2040tools @ 1.0.2
- toolchain-gccarmnoneeabi @ 1.90201.191206 (9.2.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 38 compatible libraries
Scanning dependencies...
Dependency Graph
|-- U8g2 @ 2.35.7
|-- Wire
Building in debug mode
---snip---
Linking .pio\build\pico\firmware.elf
Generating UF2 image
elf2uf2 ".pio\build\pico\firmware.elf" ".pio\build\pico\firmware.uf2"
Checking size .pio\build\pico\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 15.9% (used 42900 bytes from 270336 bytes)
Flash: [ ] 0.2% (used 4190 bytes from 2097152 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, jlink, picotool, raspberrypi-swd
CURRENT: upload_protocol = cmsis-dap
Uploading .pio\build\pico\firmware.elf
Open On-Chip Debugger 0.12.0-g4257276 (2023-01-27-10:19)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1
Error: Two or more SWD non multidrop DAPs are not supported
C:\Users\Lukas.platformio\packages\tool-openocd-raspberrypi/share/openocd/scripts/target/rp2040.cfg:29: Error:
in procedure 'script'
at file "embedded:startup.tcl", line 28
at file "C:\Users\Lukas.platformio\packages\tool-openocd-raspberrypi/share/openocd/scripts/target/rp2040.cfg", line 29
*** [upload] Error 1
What I've already tried:
- reflash Pico probe
- update PlatformIO (already newest version)
- check all connections for contact
- check power delivery to the debug target
- check that the correct pins are connected
edit:
Here is a run with --debug:
User : 5 2 options.c:52 configuration_output_handler(): debug_level: 3
User : 6 3 options.c:52 configuration_output_handler():
Debug: 7 5 options.c:233 add_default_dirs(): bindir=C:/Users/Nikhil/Downloads/Tools/msys64/mingw64/bin
Debug: 8 7 options.c:234 add_default_dirs(): pkgdatadir=C:/Users/Nikhil/Downloads/Tools/msys64/mingw64/share/openocd
Debug: 9 10 options.c:235 add_default_dirs(): exepath=C:/Users/Lukas/.platformio/packages/tool-openocd-raspberrypi/bin
Debug: 10 12 options.c:236 add_default_dirs(): bin2data=../share/openocd
Debug: 11 15 configuration.c:33 add_script_search_dir(): adding C:/Users/Lukas/AppData/Roaming/OpenOCD
Debug: 12 17 configuration.c:33 add_script_search_dir(): adding C:/Users/Lukas/.platformio/packages/tool-openocd-raspberrypi/bin/../share/openocd/site
Debug: 13 20 configuration.c:33 add_script_search_dir(): adding C:/Users/Lukas/.platformio/packages/tool-openocd-raspberrypi/bin/../share/openocd/scripts
Debug: 14 24 command.c:155 script_debug(): command - ocd_find interface/cmsis-dap.cfg
Debug: 15 26 configuration.c:88 find_file(): found C:\Users\Lukas\.platformio\packages\tool-openocd-raspberrypi/share/openocd/scripts/interface/cmsis-dap.cfg
Debug: 16 31 command.c:155 script_debug(): command - adapter driver cmsis-dap
Debug: 17 32 command.c:155 script_debug(): command - ocd_find target/rp2040.cfg
Debug: 18 34 configuration.c:88 find_file(): found C:\Users\Lukas\.platformio\packages\tool-openocd-raspberrypi/share/openocd/scripts/target/rp2040.cfg
Debug: 19 38 command.c:155 script_debug(): command - ocd_find target/swj-dp.tcl
Debug: 20 40 configuration.c:88 find_file(): found C:\Users\Lukas\.platformio\packages\tool-openocd-raspberrypi/share/openocd/scripts/target/swj-dp.tcl
Debug: 21 43 command.c:155 script_debug(): command - transport select
Info : 22 45 transport.c:265 jim_transport_select(): auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Debug: 23 49 command.c:155 script_debug(): command - ocd_find mem_helper.tcl
Debug: 24 50 configuration.c:88 find_file(): found C:\Users\Lukas\.platformio\packages\tool-openocd-raspberrypi/share/openocd/scripts/mem_helper.tcl
Debug: 25 54 command.c:155 script_debug(): command - add_usage_text mrw address
Debug: 26 56 command.c:155 script_debug(): command - add_help_text mrw Returns value of word in memory.
Debug: 27 58 command.c:155 script_debug(): command - add_usage_text mrh address
Debug: 28 60 command.c:155 script_debug(): command - add_help_text mrh Returns value of halfword in memory.
Debug: 29 63 command.c:155 script_debug(): command - add_usage_text mrb address
Debug: 30 65 command.c:155 script_debug(): command - add_help_text mrb Returns value of byte in memory.
Debug: 31 68 command.c:155 script_debug(): command - add_usage_text mmw address setbits clearbits
Debug: 32 70 command.c:155 script_debug(): command - add_help_text mmw Modify word in memory. new_val = (old_val & ~clearbits) | setbits;
Debug: 33 73 command.c:155 script_debug(): command - transport select
Debug: 34 75 command.c:155 script_debug(): command - expr [ string first "jtag" $_TRANSPORT ] != -1
Debug: 35 78 command.c:155 script_debug(): command - transport select
Debug: 36 80 command.c:155 script_debug(): command - expr [ string first "swd" $_TRANSPORT ] != -1
Debug: 37 82 command.c:155 script_debug(): command - swd newdap rp2040.core0 cpu -dp-id 0x01002927 -instance-id 0
Debug: 38 85 tcl.c:557 jim_newtap_cmd(): Creating New Tap, Chip: rp2040.core0, Tap: cpu, Dotted: rp2040.core0.cpu, 4 params
Debug: 39 88 core.c:1474 jtag_tap_init(): Created Tap: rp2040.core0.cpu @ abs position 0, irlen 0, capture: 0x0 mask: 0x0
Debug: 40 91 command.c:155 script_debug(): command - transport select
Debug: 41 92 command.c:155 script_debug(): command - expr [ string first "jtag" $_TRANSPORT ] != -1
Debug: 42 95 command.c:155 script_debug(): command - transport select
Debug: 43 97 command.c:155 script_debug(): command - expr [ string first "swd" $_TRANSPORT ] != -1
Debug: 44 99 command.c:155 script_debug(): command - swd newdap rp2040.core1 cpu -dp-id 0x01002927 -instance-id 1
Debug: 45 102 tcl.c:557 jim_newtap_cmd(): Creating New Tap, Chip: rp2040.core1, Tap: cpu, Dotted: rp2040.core1.cpu, 4 params
Debug: 46 105 core.c:1474 jtag_tap_init(): Created Tap: rp2040.core1.cpu @ abs position 1, irlen 0, capture: 0x0 mask: 0x0
Debug: 47 108 command.c:155 script_debug(): command - dap create rp2040.core0.dap -chain-position rp2040.core0.cpu
Debug: 48 111 command.c:155 script_debug(): command - target create rp2040.core0 cortex_m -endian little -coreid 0 -dap rp2040.core0.dap -rtos hwthread
Info : 49 114 hwthread.c:403 hwthread_create(): Hardware thread awareness created
Debug: 50 116 command.c:289 register_command(): command 'tpiu' is already registered
Debug: 51 118 command.c:289 register_command(): command 'rtt' is already registered
Debug: 52 120 command.c:155 script_debug(): command - rp2040.core0 configure -work-area-phys 0x20010000 -work-area-size 0x10000 -work-area-backup 0
Debug: 53 124 target.c:2199 target_free_all_working_areas_restore(): freeing all working areas
Debug: 54 127 target.c:2199 target_free_all_working_areas_restore(): freeing all working areas
Debug: 55 130 target.c:2199 target_free_all_working_areas_restore(): freeing all working areas
Debug: 56 132 command.c:155 script_debug(): command - cortex_m reset_config sysresetreq
Debug: 57 134 command.c:155 script_debug(): command - dap create rp2040.core1.dap -chain-position rp2040.core1.cpu
Error: 58 137 arm_dap.c:318 dap_check_config(): Two or more SWD non multidrop DAPs are not supported
User : 59 139 command.c:608 command_run_line(): C:\Users\Lukas\.platformio\packages\tool-openocd-raspberrypi/share/openocd/scripts/target/rp2040.cfg:29: Error:
in procedure 'script'
at file "embedded:startup.tcl", line 28
at file "C:\Users\Lukas\.platformio\packages\tool-openocd-raspberrypi/share/openocd/scripts/target/rp2040.cfg", line 29
Debug: 60 148 target.c:2199 target_free_all_working_areas_restore(): freeing all working areas
PS: I'm new to microcontroller development so I'm sorry if I made some dumb mistake.