I'm struggling with reloading and restarting the debug session on my VF61x ' Cortex M4.
After fresh restart from power on, the firmware uploads and the system starts running properly.
If I hit restart button (in Eclipse it's the "restart debug target without terminating & re-launching"), then it seems mostly works, but this is restarting same code.
If I make changes and do a rebuild, then I need to terminate current debug session, and then start debug session a new (in Eclipse the green bug icon).
Now this does not work. The code seems to get uploaded, and I may get main() entry point, but after that things don't work: break points do not work, and the code appears to run wild, don't know what it does.
The only way to fix this is to power cycle the SoC. This is of course not nice at all, and time wasteful, considering that by doing this you kill whatever is running on the A5 side at the moment ( :cursing: )
I hope to get some help with this, and so got some questions.
1. Is it possible to cleanly restart the debug session on the M4 with J-Link without resetting the entire SoC? The Vybrid manual says that when the system is already running, you cannot reload the firmware and restart the M4 without resetting
the whole chip with A5 too. But I'm not clear on if this applies for case when you have JTAG connection to the M4. [I'm really hoping Segger guys will clear this up for me ! ] (Dunno, to me sounds crazy you would have to completely reset the thing)
2. What shall be the Initial Reset & Halt reset strategy be set to? Mine set to 0/default, and if I'm not mistaken, Segger's doc says this is the only supported strategy for the target. (I have tried other numbers, with no changes noticeable).
3. The Eclipse's restart button and kill debug session followed by start a new, appear to be doing the same thing, re-uploading the code on the target and trying to restart it. (Probably because I have option "supports debugging from RAM" in Elipse on. The linker puts the firmware image to SRAM). Also every upload/restart is followed by Pre-run/Restart reset, which again, I have set to reset type as 0.
Is this correct?
During this reset I have to find vector table and set the sp right. Anything else missing?
In both cases in Eclipse - restart without terminating & relaunching , and full stop, followed by debug start - it seems the steps executed are same: reset, upload code, reset again, set some registers right, go, break at main.
But yet full stop (with terminating) followed by start again does not work as I wrote, have to kill the target entirely.
Any help with this would be appreciated.
After fresh restart from power on, the firmware uploads and the system starts running properly.
If I hit restart button (in Eclipse it's the "restart debug target without terminating & re-launching"), then it seems mostly works, but this is restarting same code.
If I make changes and do a rebuild, then I need to terminate current debug session, and then start debug session a new (in Eclipse the green bug icon).
Now this does not work. The code seems to get uploaded, and I may get main() entry point, but after that things don't work: break points do not work, and the code appears to run wild, don't know what it does.
The only way to fix this is to power cycle the SoC. This is of course not nice at all, and time wasteful, considering that by doing this you kill whatever is running on the A5 side at the moment ( :cursing: )
I hope to get some help with this, and so got some questions.
1. Is it possible to cleanly restart the debug session on the M4 with J-Link without resetting the entire SoC? The Vybrid manual says that when the system is already running, you cannot reload the firmware and restart the M4 without resetting
the whole chip with A5 too. But I'm not clear on if this applies for case when you have JTAG connection to the M4. [I'm really hoping Segger guys will clear this up for me ! ] (Dunno, to me sounds crazy you would have to completely reset the thing)
2. What shall be the Initial Reset & Halt reset strategy be set to? Mine set to 0/default, and if I'm not mistaken, Segger's doc says this is the only supported strategy for the target. (I have tried other numbers, with no changes noticeable).
3. The Eclipse's restart button and kill debug session followed by start a new, appear to be doing the same thing, re-uploading the code on the target and trying to restart it. (Probably because I have option "supports debugging from RAM" in Elipse on. The linker puts the firmware image to SRAM). Also every upload/restart is followed by Pre-run/Restart reset, which again, I have set to reset type as 0.
Is this correct?
During this reset I have to find vector table and set the sp right. Anything else missing?
In both cases in Eclipse - restart without terminating & relaunching , and full stop, followed by debug start - it seems the steps executed are same: reset, upload code, reset again, set some registers right, go, break at main.
But yet full stop (with terminating) followed by start again does not work as I wrote, have to kill the target entirely.
Any help with this would be appreciated.