VS Code C/C++插件升級後,變成無法去找出原先定義的地方。
後來發現是VS Code沒有IAR設定生成的問題,就試著手工填看看,結果有成功。
開入STM32專案目錄後,開C檔會有一堆紅標。
點任一個紅標字,左側會出現一個小燈泡,去點它,會開啟c_cpp_properties.json檔
先借用win32的除錯器來用。
原文:
"name": "Win32",
"includePath": [
"${workspaceRoot}",
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/um",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/ucrt",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/shared",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/winrt"
],
"defines": [
"_DEBUG",
"UNICODE"
],
改成:
"name": "Win32",
"includePath": [
"${workspaceRoot}/",
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/um",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/ucrt",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/shared",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.10586.0/winrt",
"${workspaceRoot}/BLE_CNTR/Inc",
"${workspaceRoot}/BLE_CNTR/Drivers/STM32L0xx_HAL_Driver/Inc",
"${workspaceRoot}/BLE_CNTR/Drivers/STM32L0xx_HAL_Driver/Inc/Legacy",
"${workspaceRoot}/BLE_CNTR/Middlewares/Third_Party/FreeRTOS/Source/portable/IAR/ARM_CM0",
"${workspaceRoot}/BLE_CNTR/Drivers/CMSIS/Device/ST/STM32L0xx/Include/",
"${workspaceRoot}/BLE_CNTR/Middlewares/Third_Party/FreeRTOS/Source/include",
"${workspaceRoot}/BLE_CNTR/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS",
"${workspaceRoot}/BLE_CNTR/Drivers/CMSIS/Include"
],
"defines": [
"_DEBUG",
"UNICODE",
"USE_HAL_DRIVER",
"STM32L051xx"
],
就可以用了。
沒有留言:
張貼留言