Open perexg opened 3 years ago
note that this works for all program types
Thank you for the clarification. The getting started guide use load
+ reset init
sequences which works only for the flash programs. The RAM loading / booting requires the reset halt
+ load
otherwise you can encounter weird behavior like the USB device enumeration failures (no BUS RESET interrupts) etc. when you jump to the updated RAM program without reset. The reset init
boots always to flash, of course.
oh, thanks... I didn't realize that was there
@lurch can you fix to move the monitor reset init
before the load
in section 6.3
monitor reset init
then load
... that's what I used and have never seen an issue...It seems that monitor reset init
and monitor reset halt
do both the right job. The only difference is initial PC address (0xf0 or 0x2700). The order of monitor reset
and load
commands matters for the no-flash program. I apologize for the confusion.
@lurch can you fix to move the monitor reset init before the load in section 6.3
@lurch Did this get done, or still in backlog?
Still in backlog.
For anyone struggling with VSCode and Cortex-Debug: I was able to debug my "no_flash" binary by replacing the postRestartCommands
in the launch.json
from the examples with:
"overrideLaunchCommands": [
"monitor reset init",
"load ${command:cmake.launchTargetPath}"
],
I remember this working without this workaround, maybe something changed in the recent releases of the SDK.
I no longer work on the documentation, so transferring this issue to @nathan-contino instead :slightly_smiling_face:
The program loading and debugging procedure for
-DPICO_NO_FLASH=1
compilation option is not documented (gdb / openocd). I went through some trial and error steps to make it work. It would be probably nice to document this. My sequence:If everything is ok (program is in RAM - starts at 0x20000000):