我正在使用ARM的MBED OS开发原型。我对C 很新,因此具有语法工作是理想的选择,但是它挂在" mbed.h"的进口上。
项目的结构是:
- /
- myfile.cpp
- mbed-os/
- mbed.h
语法是在说 fatal error: 'mbed.h' file not found
。
如何获得语法/GCC(或使用的任何内容)来查找标题文件?
更新:
看起来像包括以下内容的 .syntastic_cpp_config
文件有帮助(但涉及一个荒谬的痛苦过程,添加一条线,运行语法,查找下一个丢失的标头文件):
-Imbed-os
-Imbed-os/cmsis
-Imbed-os/cmsis/TARGET_CORTEX_M
-Imbed-os/cmsis/TARGET_CORTEX_M/TOOLCHAIN_GCC
-Imbed-os/drivers
-Imbed-os/events
-Imbed-os/features
-Imbed-os/hal
-Imbed-os/platform
-Imbed-os/rtos
-Imbed-os/targets
-Imbed-os/targets/TARGET_NORDIC/TARGET_NRF5
-Imbed-os/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832
-Imbed-os/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/TARGET_NRF52_DK
-Imbed-os/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF52832/device
-Imbed-os/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_SDK11/device
-Imbed-os/tools
这根本不是一个完整的列表,但是我几乎宁愿在此状态下遇到编译器错误,而不是继续寻找标头文件。
您可以通过以下方式生成项目的flagile来获得详尽的标志列表 mbed export -i make_gcc_arm -m K64F --profile mbed-os/tools/profiles/debug.json
cf:https://os.mbed.com/docs/v5.6/tools/debugging.html