Dear Arm Experts,
I've met a case which puzzled me for several days.
Currently I do not need to use the EL2, so I make the R52 switch to EL1 in the reset_handler in the startup.S.
I create a image which runs from the internal flash, so once power up the R52, the image in the flash will run at EL1 mode.
But at this time, the R52 will fail if I want to debug program built in flash or sram due to the program runs from the reset_handler and do the switch from EL2 to EL1.
I've to erase the image in the flash, so that I can do the debug...
So if there is a method to help fix the case so that I don't need to erase flash every time.
For example, if there exist a register that can reset the R52 to EL2 and the debugger can do the reset and halt the R52?
Any suggestions are most welcome!
Gavin
Which toolchain are you using? Arm Development Studio?There is a startup_Cortex-R52_AC6 example provided that does much of what you mention above without issue.
I think you just need to do a "connect only" connection, then load (debug) symbols only so that the Flash is not re-written or erased.
Hi Ronan,
I'm working on with IAR toolchain.
You said just do a "connect", does it mean the debugger will do the reset of the R52 which make the R52 re-enter the EL2 mode during the connection?
BR,
You are probably better to discuss with IAR.
With the Arm tools, a connect only connection simply stops the processor in whatever state it is at that time. Are you trying to debug immediately from reset?
The below is written for Armv8-A, but I believe it also applies to Armv8-R processors also:
https://developer.arm.com/documentation/102140/0200/Reset