回复我目前的解决方案,经过实验,需要利用两个调试配置,一个用于启动调试时设置,一个是点击复位设备时调用,放在launch.json文件内:
"postRestartCommands": [
"set $sp = *(unsigned int *)0x20000000",
"set $pc = *(unsigned int *)0x20000004"
],
"postLaunchCommands": [
"set $sp = *(unsigned int *)0x20000000",
"set $pc = *(unsigned int *)0x20000004"
]