Пользуюсь плагином "Cortex-Debug", компилятор GCC 8. Пока разобрался, пришлось некоторое время посовокупляться с конфигами, не столько самого отладчика, сколько Кодовского ИнтелиСенс-а. c_cpp_properties.json:
{
"configurations": [
{
"name": "STM32 Debug",
"intelliSenseMode": "${default}",
"includePath": [
"${workspaceFolder}/MyCode",
"${workspaceFolder}/../Common",
"${workspaceFolder}/Drivers/STM32F1xx_HAL_Driver/Inc",
"${workspaceFolder}/Inc",
"${workspaceFolder}/Drivers/CMSIS/Device/ST/STM32F1xx/Include",
"${workspaceFolder}/Drivers/CMSIS/Include",
"${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS",
"${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/include",
"${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3",
"C:/Programs/ArmGCC/arm-none-eabi/include",
"C:/Programs/ArmGCC/lib/gcc/arm-none-eabi/8.2.1/include"
],
"defines": [
"USE_HAL_DRIVER",
"USE_FULL_LL_DRIVER",
"STM32F103xE",
"DEBUG",
"__CC_ARM",
"__attribute__(x)="
]
},
{
"name": "STM32 Release",
"intelliSenseMode": "${default}",
"includePath": [
"${workspaceFolder}/MyCode",
"${workspaceFolder}/../Common",
"${workspaceFolder}/Drivers/STM32F1xx_HAL_Driver/Inc",
"${workspaceFolder}/Inc",
"${workspaceFolder}/Drivers/CMSIS/Device/ST/STM32F1xx/Include",
"${workspaceFolder}/Drivers/CMSIS/Include",
"${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS",
"${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/include",
"${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3",
"C:/Programs/ArmGCC/arm-none-eabi/include",
"C:/Programs/ArmGCC/lib/gcc/arm-none-eabi/8.2.1/include"
],
"defines": [
"USE_HAL_DRIVER",
"USE_FULL_LL_DRIVER",
"STM32F103xE",
"RELEASE",
"__CC_ARM",
"__attribute__(x)="
]
}
],
"version": 4
}
launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microso …/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
//"showDevDebugOutput": true,
"cwd": "${workspaceRoot}",
"executable": "build/App.elf",
"request": "launch",
"type": "cortex-debug",
"runToMain": true,
"servertype": "jlink",
"device": "STM32F103VC",
"interface": "swd",
"swoConfig": {
"enabled": true,
"source": "probe",
"cpuFrequency": 72070000,
"swoFrequency": 6000000,
"decoders": [
{
"port": 0,
"type": "console"
}
]
}
}
]
}