我在尝试在 STM32CubeIDE 中编译 Semtech SDK 时遇到问题。我正在研究如何在该 IDE 中编译和调试它,因为这些项目是仅为 Keil uVision 创建的,并且是使用 GNU ARM 工具链作为 Makefiles 创建的。
我有以下错误“没有这样的文件或目录”,但该目录已包含。
17:29:44 **** Incremental Build of configuration Debug for project gnss_test_executable_02 ****
make all
arm-none-eabi-gcc "../lr11xx/common/printers/lr11xx_bootloader_types_str.c" -mcpu=cortex-m4 -std=gnu11 -g3 -c -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"lr11xx/common/printers/lr11xx_bootloader_types_str.d" -MT"lr11xx/common/printers/lr11xx_bootloader_types_str.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "lr11xx/common/printers/lr11xx_bootloader_types_str.o"
In file included from ../lr11xx/common/printers/lr11xx_bootloader_types_str.c:1:
../lr11xx/common/printers/lr11xx_bootloader_types_str.h:3:10: fatal error: lr11xx_bootloader_types.h: No such file or directory
3 | #include "lr11xx_bootloader_types.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [lr11xx/common/printers/subdir.mk:40: lr11xx/common/printers/lr11xx_bootloader_types_str.o] Error 1
"make all" terminated with exit code 2. Build might be incomplete.
17:29:48 Build Failed. 2 errors, 0 warnings. (took 3s.298ms)
我已将SDK的文件目录导入到我的工作空间中。
我包含了所有具有.h文件的文件夹,包括错误文件所在的“lr11xx\lr11xx_driver\src”。
这可能是与宏或环境变量相关的问题吗?
提前致谢,请随时询问您可能需要的任何信息。
我尝试过的:
我已在“C/C++ Build”部分的属性中包含“Includes”目录。
我还特别在 C/C++ Build -> Settings -> Tool Settings -> MCU GCC Compiler -> Include Paths -> Include files (-include) 部分中包含了文件“lr11xx_bootloader_types.h”。
我试图弄清楚这是否与宏或环境变量有关,但尚未找到解决方案。