platformio / platformio/platform-raspberrypi
Under PlatformIO, debug rp2040 with "rp2040 dap" is ok, but download shows error.
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 94
- Forks
- 141
- PR merge metrics
- No merged PRs in 30d
Description
Make a "rp2040 dap" with this , and use it to debug another rp2040 is very cool, debug is OK, but download shows error.
This is my platform.ini:
[env:upstream_develop]
platform = https://github.sunflyer.cn/platformio/platform-raspberrypi.git
framework = arduino
board = pico
board_build.f_cpu = 120000000L
debug_tool = cmsis-dap
upload_protocol = cmsis-dap
debug_speed = 1000000
This is the upload log:
> Executing task in folder 220428-141324-arduino-blink: C:\Users\THINKPAD\.platformio\penv\Scripts\platformio.exe run --target upload <
Processing upstream_develop (platform: https://github.sunflyer.cn/platformio/platform-raspberrypi.git; framework: arduino; board: pico)
----------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/raspberrypi/pico.html
PLATFORM: Raspberry Pi RP2040 (1.6.0+sha.e08da69) > Raspberry Pi Pico
HARDWARE: RP2040 120MHz, 264KB RAM, 2MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, jlink, raspberrypi-swd)
PACKAGES:
- framework-arduino-mbed 3.0.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 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <SPI>
Building in release mode
Checking size .pio\build\upstream_develop\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 17.0% (used 45844 bytes from 270336 bytes)
Flash: [ ] 0.2% (used 4322 bytes from 2097152 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, jlink, picotool, raspberrypi-swd
CURRENT: upload_protocol = cmsis-dap
Uploading .pio\build\upstream_develop\firmware.elf
Open On-Chip Debugger 0.11.0+dev-gec0240e6a-dirty (2021-03-09-09:44)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1
adapter speed: 1000000 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x000000ea msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0xf1000000 pc: 0x000000ea msp: 0x20041f00
** Programming Started **
Warn : no flash bank found for address 0x10000000
Warn : no flash bank found for address 0x10013fa0
** Programming Finished **
** Verify Started **
Warn : target was in unknown state when halt was requested
Error: timed out while waiting for target halted
Error: error executing cortex_m crc algorithm
Error: checksum mismatch - attempting binary compare
embedded:startup.tcl:530: Error: ** Verify Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 591
at file "embedded:startup.tcl", line 530
*** [upload] Error 1
========================================================= [FAILED] Took 5.58 seconds ====================================
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied platform.ini and upload log, focusing on the cmsis-dap upload path and the OpenOCD warnings about the missing flash bank. Reproduce the upload with the referenced RP2040 firmware setup; done means programming and verification complete without the timeout or checksum errors.
Written by the indexing model from the issue text.
Assessment
- Domain
- devtools, embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100