如何修复“*** [obj / flash_board_cstartup.o]错误2”

时间:2014-12-26 16:18:01

标签: arm embedded microcontroller

我正在尝试使用SAM7S示例包" at91sam7s-ek"可从Atmel网站获取。

当我将任何项目加载到Eclipse中时,在构建项目后会出现以下错误。

make: *** [obj/flash_board_cstartup.o] Error 2

我已检查过路径是否正确,文件是否应该在哪里。

是否有人可以帮助我实现这一目标,或者是否有人可以推荐一套更适合SAM7S设备的示例?

CDT构建控制台是:

18:58:29 **** Incremental Build of configuration Default for project test_project ****
make all 
arm-none-eabi-gcc -g -O0 -I../at91lib/boards/asn442g -I../at91lib/peripherals  -I../at91lib/components -I../at91lib -I. -I../at91lib/utility -I../external_libs/ethernet/lwip/src/include -I../external_libs/ethernet/lwip/src/include/lwip -I../external_libs/ethernet/lwip/src/include/ipv4 -I./system/modbus/tcp -I./system/modbus/tcp/arch -I./system/dal/dalAdc -I./system/dal/dalHoldingRegisters -I./system/dal/dalTimer -I./system/bll/bllModbusTCP -I./system/drivers/drvGprsLink -I./system/drivers/drvAtmBus -I./system/hal/halUsart1 -I./system/hal/halGpio -I./system/hal/halUsart0 -I./system/drv/drvAtmBus -Dat91sam7x256 -D__ASSEMBLY__ -Dflash -c -o obj/flash_board_cstartup.o ../at91lib/boards/asn442g/board_cstartup.S
process_begin: CreateProcess(NULL, arm-none-eabi-gcc -g -O0 -I../at91lib/boards/asn442g -I../at91lib/peripherals -I../at91lib/components -I../at91lib -I. -I../at91lib/utility -I../external_libs/ethernet/lwip/src/include -I../external_libs/ethernet/lwip/src/include/lwip -I../external_libs/ethernet/lwip/src/include/ipv4 -I./system/modbus/tcp -I./system/modbus/tcp/arch -I./system/dal/dalAdc -I./system/dal/dalHoldingRegisters -I./system/dal/dalTimer -I./system/bll/bllModbusTCP -I./system/drivers/drvGprsLink -I./system/drivers/drvAtmBus -I./system/hal/halUsart1 -I./system/hal/halGpio -I./system/hal/halUsart0 -I./system/drv/drvAtmBus -Dat91sam7x256 -D__ASSEMBLY__ -Dflash -c -o obj/flash_board_cstartup.o../at91lib/boards/asn442g/board_cstartup.S, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [obj/flash_board_cstartup.o] Error 2

18:58:33 Build Finished (took 3s.647ms)

1 个答案:

答案 0 :(得分:0)

当make return Error nn时,表示执行make的命令返回了非零值nn。您需要查看失败的teh命令的错误消息,而不是 make 的最终状态 - make 没有失败;你的构建失败了。

在这种情况下,相关的错误消息(省略)是:

process_begin: CreateProcess(NULL, arm-none-eabi-gcc  [...] obj/flash_board_cstartup.o
../at91lib/boards/asn442g/board_cstartup.S, ...) failed.

从表面上看,无法找到编译器 arm-none-eabi-gcc 。它是否已安装, PATH 环境变量是否包含其位置?