Closed thedigitaledge closed 1 year ago
We do not and cannot control how your processor boots and how many layers of bootloaders it runs through. As you can see, we did
12-target-download
13-interpreter-exec console "monitor reset"
15-break-insert -t --function main
16-exec-continue --all
Now, the rest is in your FW's hand and if the program (PC) ever arrives at the specified function your processor should halt.
Now, if your bootloader does another FULL reset, the breakpoint is lost. It all depends on your FW which includes the bootloader.
If you need custom start sequence, there are a slew of options for you. Without knowing a lot of details, I cannot tell you what will work for you.
By the looks of it I haven't gotten the my head around how the system boots and I've confused the issue.
I think the question I should have asked is can I disable the reset call at 13 as without it I can get the application to run by manually entering all the previous and subsequent commands.
https://github.com/Marus/cortex-debug/blob/master/debug_attributes.md
See above. Tons of options to override/add to what we do. In this case look for anything that starts with override
, pre
and post
Also read how our debug process works (applies to most debuggers)
https://github.com/Marus/cortex-debug/wiki/Cortex-Debug-Under-the-hood
You can always attach
instead of a launch
if that works better. Without a proper reset, launch
will not work properly.
https://github.com/Marus/cortex-debug/wiki/Cortex-Debug-Under-the-hood I missed that thank you.
To answer my own problem;
To run the program from RAM I used the following command to stop the PC, etc from being reset.
"overrideLaunchCommands": [ "monitor halt", "monitor reset", "load" ]
Please make you search through our existing issues (both open and closed)
Describe the bug Application does not run as expected when debugging a program from RAM.
The NXP MCIMX7ULP-EVK which is a multi-core chip that can be configured to run only it's Cortex-M4 chip. This requires the system to execute it's boot-loader and read configuration pins then it halt the device. When its stop the debugger can upload a program to ram RAM which has to also sets the PC and other registers to enable the program to correctly run from the RAM.
I've run through the commands from the debug console window and I have found that skipping the '13-interpreter-exec console "monitor reset" ' makes the application run correct as expected.
I've tried to work out where in the system this instruction comes from but I've gotten lost in the code. I can't work out if there's either a configuration option to override it or one of the debug attributes overloads this call.
I've seen a few other issues that refer to running from RAM but nothing that's gotten down the function call that's causing it to fail.
Thanks, Chris
To Reproduce Setup a basic application using Jlink and GDB on an NXP MCIMX7ULP-EVK development board with runToEntryPoint set to "main"
Expected behavior
Program will halt at the main function call.
Screenshots
[comment]: <> If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
[comment]: <> Whenever possible, please make sure you are using the latest versions of VSCode and our extension
Please include
launch.json
Note: We are unlikely to look at the issue if you do not supply this
Attach text from
Debug Console
Please enable debug output in your launch.json (
"showDevDebugOutput": "raw"
). It this is too large, please attach it as a fileAdditional context Add any other context about the problem here.