Hi, chris coleman:
I’m interested in this topic, but when I disable Halting Debug from GDB, the result is different from what you said. I use stm32F769I_Discovery platform with on board stlink debugger.
when gdb set: set (uint32_t)0xE000EDF0=(0xA05F<<16), DHCSR register result is not 0xA05F0000, then I step, the debugger crash.
Do you have some idea, the stlink do not support Monitor Mode Debugging?
Is there some other way to write DHCSR register with the current platform, waiting for your reply, thank you.
Hi, it is normal because once you clear the enable bit on DHCSR, it will disable the halt mode right now. So the stlink cann’t work before next reset. You can only do monitor debug on shell the next step. I port it to my stm32f103rc chip and it work.
Another tip is that you should enable the AFIO_MAPR register for stm32 chip to enable the memory remap fro debugger. At first I disable it which cause a “cann’t access memory” error when I try to do set (uint32_t )0xE000EDF0=(0xA05F<<16), on gdb
Hi, Jack3100:
Thank you for your reply and your working. I will try as your reply.
Could you tell AFIO_MAPR register address and the value, and could you shared stm32f103rc porting code or github website?
I’m glad to tell you my demo code is ready at https://github.com/cheng3100/armdbg. I wish you can give me some feed back like give me a star or issue on it if you like it.