Open kylongmu opened 2 years ago
Error: checksum mismatch - attempting binary compare
I've experienced this error too when using a too high programming speed.
debug_speed = 1000000
this value is in khz. 1 million killohertz is a gigahertz. Please set debug_sped = 1000
and retry debugging, or try out the PR #36, it also respects the speed when using a regular upload.
Error: checksum mismatch - attempting binary compare
I've experienced this error too when using a too high programming speed.debug_speed = 1000000
this value is in khz. 1 million killohertz is a gigahertz. Please set
debug_sped = 1000
and retry debugging, or try out the PR #36, it also respects the speed when using a regular upload.
But the download is not work also, this is the output with debug_sped = 1000
RAM: [== ] 17.3% (used 46672 bytes from 270336 bytes)
Flash: [ ] 0.2% (used 4346 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: 1000 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 0x10016ad8
** Programming Finished **
** Verify Started **
target halted due to debug-request, current mode: Thread
xPSR: 0x81000000 pc: 0x1000c9ac psp: 0x20008838
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 23.32 seconds ========================================================
Can you try to go even lower, like 100kHz?
Warn : no flash bank found for address 0x10000000 Warn : no flash bank found for address 0x10016ad8
Those don't look good.
Does this also occur when using the Picoprobe firmware (https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html#debugging-using-another-raspberry-pi-pico) and configuration? (upload_protocol = picoprobe
and wire them up like seen in https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf page 61)
Instead of using platform = https://github.sunflyer.cn/platformio/platform-raspberrypi.git
you can try using platform = https://github.com/maxgerhardt/platform-raspberrypi.git
, so that you have a more up-to-date openocd version and picoscope support. Maybe that fixes it already.
With 100k download:
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 17.3% (used 46672 bytes from 270336 bytes)
Flash: [ ] 0.2% (used 4346 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: 100 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 0x10016ad8
** Programming Finished **
** Verify Started **
target halted due to debug-request, current mode: Thread
xPSR: 0x81000000 pc: 0x1000c9ac psp: 0x20008838
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 38.31 seconds ========================================================
And can't enter debug mode with 100k
Instead of using
platform = https://github.sunflyer.cn/platformio/platform-raspberrypi.git
you can try usingplatform = https://github.com/maxgerhardt/platform-raspberrypi.git
, so that you have a more up-to-date openocd version and picoscope support. Maybe that fixes it already.
This is OK:
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 17.3% (used 46672 bytes from 270336 bytes)
Flash: [ ] 0.2% (used 4346 bytes from 2093056 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, jlink, picoprobe, picotool, raspberrypi-swd
CURRENT: upload_protocol = cmsis-dap
Uploading .pio\build\upstream_develop\firmware.elf
Open On-Chip Debugger 0.11.0-g610f137 (2022-02-11-13:57)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 1
adapter speed: 1000 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 **
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
** Programming Finished **
** Verify Started **
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000184 msp: 0x20041f00
** Verified OK **
** Resetting Target **
shutdown command invoked
======================================================== [SUCCESS] Took 33.74 seconds ========================================================
Thanks a lot!
Then the issue will be fixed once https://github.com/platformio/platform-raspberrypi/pull/36 is merged.
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:
This is the upload log: