使用 OpenOCD 和 VSCode 的实时变量视图
Live variable view using OpenOCD and VSCode
我非常喜欢在嵌入式项目中通过 Keil 或 Eclipse 使用 VScode + cortex 调试扩展 + openOCD。虽然我不知道如何设置实时变量视图,但您可以使用 eclipse + openOCD 进行设置。
1.是否可以在 VScode 上使用 openOCD 和 cortex 调试实时查看 SWD 上的全局变量?
我只能在暂停程序时看到变量值,在调试程序时我看到:
当运行:
柜台:不可用
暂停时:
计数器:550
Cortex 调试配置:
{
"version": "0.2.0",
"configurations": [
{
"name": "Cortex Debug",
"cwd": "${workspaceRoot}",
"executable": "D:\Code\embedded\STM32F1\build\STM32F1.elf",
"device": "STM32F103C8",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"svdFile": "D:\Code\embedded\STM32F1\STM32F103.svd",
"configFiles": [
"D:\apps\openOCD\OpenOCD-20190426-0.10.0\share\openocd\scripts\board\stm32f103c8_blue_pill.cfg"
]
}
]
}
您可以使用 ST-Link GDB 服务器而不是 OCD 来查看实时变量。在STM32CubeIDE上测试过。将在 VSCODE.
测试时更新
我非常喜欢在嵌入式项目中通过 Keil 或 Eclipse 使用 VScode + cortex 调试扩展 + openOCD。虽然我不知道如何设置实时变量视图,但您可以使用 eclipse + openOCD 进行设置。
1.是否可以在 VScode 上使用 openOCD 和 cortex 调试实时查看 SWD 上的全局变量?
我只能在暂停程序时看到变量值,在调试程序时我看到:
当运行:
柜台:不可用
暂停时:
计数器:550
Cortex 调试配置:
{
"version": "0.2.0",
"configurations": [
{
"name": "Cortex Debug",
"cwd": "${workspaceRoot}",
"executable": "D:\Code\embedded\STM32F1\build\STM32F1.elf",
"device": "STM32F103C8",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
"svdFile": "D:\Code\embedded\STM32F1\STM32F103.svd",
"configFiles": [
"D:\apps\openOCD\OpenOCD-20190426-0.10.0\share\openocd\scripts\board\stm32f103c8_blue_pill.cfg"
]
}
]
}
您可以使用 ST-Link GDB 服务器而不是 OCD 来查看实时变量。在STM32CubeIDE上测试过。将在 VSCODE.
测试时更新