2

在我的项目中,我同时使用 Scons 和 Makefile 来构建。当我使用 Makefile 时它工作得很好,但当我使用 Scons 时出错

“arm-none-eabi-gcc -g -mthumb -mlittle-endian -mcpu=cortex-m4 -mcpu=cortex-m4 -Wl,--start-group -lm -lc -Wl,--end-group -Wl ,--gc-sections -Wl,-Map,main.map -Tstm32_flash.ld -Wl,--entry=Reset_Handler -DSTM32F407xx -DUSE_STDPERIPH_DRIVER -I/home/minhtan/Downloads/STM32F4-Discovery_FW_V1.1.0/Utilities/STM32F4-发现 -I/home/minhtan/Downloads/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/包含 -I/home/minhtan/Downloads/STM32F4-Discovery_FW_V1.1.0/Libraries/CMSIS/ST/STM32F4xx/包含 -I/home/ minhtan/Downloads/STM32F4-Discovery_FW_V1.1.0/Libraries/STM32F4xx_StdPeriph_Driver/inc "-I/home/minhtan/Downloads/led(make file moi)" main.c -c -o main.o
sh: 1: arm-none- eabi-gcc: not found
scons: [main.o] Error 127
scons: building 由于错误而终止。”

4

1 回答 1

1

这看起来像是我们在http://scons.org/faq.html上的“最常见”常见问题解答中的第 1 个答案可以帮助您。默认情况下,SCons 不会$PATH从周围的 shell 环境中导入变量。您必须$PATH正确检测arm-none-eabi-gcc可执行文件或明确指定可执行文件的完整路径...查看提到的常见问题解答条目以更详细地讨论事情为何如此,以及如何向$PATH您的用户提供所需的定义构建环境。

于 2016-08-11T11:54:15.610 回答