在 Eclipse 中,当我将 C elf 文件转换为 IMG 文件时出现构建后错误。
这是错误:
Building target: USBDebug.elf
Invoking: ARM Sourcery Windows GCC C Linker
arm-none-eabi-gcc ./cyfx_gcc_startup.o ./cyfxtx.o ./cyfxusbdebug.o ./cyfxusbdscr.o -T"C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.2\/firmware/common/fx3.ld" -nostartfiles -Wl,-Map,USBDebug.map -Wl,-d -Wl,--no-wchar-size-warning -Wl,--gc-sections -Wl,--entry,CyU3PFirmwareEntry "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.2\\firmware\u3p_firmware\lib\fx3_debug\cyfxapi.a" "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.2\\firmware\u3p_firmware\lib\fx3_debug\cyu3lpp.a" "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.2\\firmware\u3p_firmware\lib\fx3_debug\cyu3threadx.a" "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.2\\arm-none-eabi\lib\libc.a" "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.2\\lib\gcc\arm-none-eabi\4.5.2\libgcc.a" -mcpu=arm926ej-s -mthumb-interwork -g -gdwarf-2 -o"USBDebug.elf"
**/usr/bin/sh: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.2\util\elf2img\elf2img.exe: command not found
Finished building target: USBDebug.elf
cs-make[1]: [post-build] Error 127 (ignored)**
cs-make --no-print-directory post-build
Converting ELF to image (.img) format
"C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.2\\util\elf2img\elf2img.exe" -i USBDebug.elf -o USBDebug.img
即使我在 Windows 中,/usr/bin/sh 也会出现,这对我来说似乎很奇怪。我可以进入命令提示符并输入它,它工作得很好
"C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.2\\util\elf2img\elf2img.exe" -i USBDebug.elf -o USBDebug.img
有人知道为什么我找不到命令吗?