赞
踩
使用VSCode编辑STM32cubeIDE工程解决路径报错问题
如图会看到很多报错
VSCode中 Ctrl + P,输入 >c/c++, 会自动在工程根目录中创建.vscode文件夹和配置文件
打开配置文件,删除里边的内容,换成如下代码
{ "configurations": [ { "name": "STM32", "includePath": [ "${workspaceFolder}/Core/Inc", "${workspaceFolder}/Drivers/STM32F4xx_HAL_Driver/Inc", "${workspaceFolder}/Drivers/STM32F4xx_HAL_Driver/Inc/Legacy", "${workspaceFolder}/Drivers/CMSIS/Device/ST/STM32F4xx/Include", "${workspaceFolder}/Drivers/CMSIS/Include", ], "defines": [ "USE_HAL_DRIVER", "STM32F407xx", "USE_HAL_DRIVER", "USE_HAL_DRIVER" ], "compilerPath": "D:/SoftWare/SoftWare_CubeIDE/STM32CubeIDE_1.6.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924/tools/arm-none-eabi/include/machine/_default_types.h", "cStandard": "c99", "cppStandard": "c++11", "intelliSenseMode": "${default}" } ], "version": 4 }
其中需要更改的有includePath defines compilerPath
更改includePath
参考stm32cubeide中属性->Paths and Symbols->Includes
https://www.weixiuzhan.cn/news/show-33710.html
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。