arduino / arduino/ArduinoCore-mbed
openocd 0.11.0-arduino2 does not know target/rp2040.cfg
- Dominant language
- C
- Stars
- 411
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Set up a spare Raspberry PI Pico as a Picoprobe (as described in https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf Chapter A) and tried to upload a sketch using a programmer instead of using picotool:
```
arduino-cli board attach -p /dev/ttyACM0 -b arduino:mbed_rp2040:pico
arduino-cli compile
arduino-cli upload -P cmsis-dap -v
```
Sadly, it fails as openocd is trying to load a non-existing config:
```
"/home/pi/.arduino15/packages/arduino/tools/openocd/0.11.0-arduino2/bin/openocd" -d2 -s "/home/pi/.arduino15/packages/arduino/tools/openocd/0.11.0-arduino2/share/openocd/scripts/" -f interface/cmsis-dap.cfg -f target/rp2040.cfg -c "telnet_port disabled; init; reset init; halt; adapter speed 10000; program {/tmp/arduino/sketches/CF5F9525C622B4069B93C96C38646A84/neopixel.ino.elf}; reset run; shutdown"
Open On-Chip Debugger 0.11.0+dev-gab95bac57-dirty (2021-05-11-10:55)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
embedded:startup.tcl:26: Error: Can't find target/rp2040.cfg
in procedure 'script'
at file "embedded:startup.tcl", line 26
Fehlgeschlagene Programmierung: Hochladefehler: exit status 1
```
boards.txt is using a wrong target:
```
pico.bootloader.tool=openocd
pico.bootloader.tool.default=openocd
pico.bootloader.config=-f target/rp2040.cfg
pico.bootloader.programmer=-f interface/cmsis-dap.cfg
```
The bundled openocd-0.11.0-arduino2 does only have the following target:
`~/.arduino15/packages/arduino/tools/openocd/0.11.0-arduino2/share/openocd/scripts/target/rp2040-core0.cfg`
Please either rename the file to rp2040.cfg, or update boards.txt to point to the correct file.
Contributor guide
No contributing guide indexed for this repository
Research direction
Read the `pico.bootloader.config` and `pico.bootloader.programmer` entries in `boards.txt`, then compare the configured target with the bundled OpenOCD target file `target/rp2040-core0.cfg`. Done means the Pico upload configuration refers to a target file that exists in the bundled OpenOCD scripts.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 30/100