當安裝完成AndeSight_v1.4後,開啟一個新的C Project,當Build Project後發現以下error.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**** Build of configuration Debug for project Hello ****
make -k pre-build main-build
Auto-Generated folder; please do not remove this pre-build step.
rm -rf output; mkdir output
Building file: ../hello.c
Invoke C Compiler
/cygdrive/c/Andestech/AndeSight14/toolchains/nds32le-elf-newlib-V2/bin/nds32le-elf-gcc -fno-builtin -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"hello.d" -MT"hello.d" -ohello.o ../hello.c
nds32le-elf-gcc: /cygdrive/d/build-as-v1_4/v14-config/../build-2010-05-10/task-nds32le-elf-newlib-V2/build/disable-shared/nds32le-elf/lib/gcc/nds32le-elf/specs: No medium found
make: *** [hello.o] Error 1
Invoke NM Tool
/cygdrive/c/Andestech/AndeSight14/toolchains/nds32le-elf-newlib-V2/bin/nds32le-elf-nm -n -l -C Hello.adx > ./output/symbol.txt
/cygdrive/c/Andestech/AndeSight14/toolchains/nds32le-elf-newlib-V2/bin/nds32le-elf-nm: 'Hello.adx': No such file
make: *** [output/symbol.txt] Error 1
Invoke Readelf Tool
/cygdrive/c/Andestech/AndeSight14/toolchains/nds32le-elf-newlib-V2/bin/nds32le-elf-readelf -a Hello.adx > ./output/readelf.txt
readelf: Error: 'Hello.adx': No such file
make: *** [output/readelf.txt] Error 1
Invoke Objdump Tool
# The tool is disabled.
Finished building: output/objdump.txt
Invoke Objcopy Tool
# The tool is disabled.
Finished building: output/Hello.bin
make: Target `main-build' not remade because of errors.
Build complete for project Hello
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
主要是GCC 預設會先找build 資料夾的 specs (AndeSight_v1.4是在 d:\ 底下 build),如果路徑不存在就會找自己 toolchain底下的 specs($TOOLCHAIN_ROOT/lib/gcc/nds32le-elf/3.4.4/specs)
這時d:\ 如果設定為光碟機,而且裡面沒有光碟,當存取 d:\ 會遇到 “No Medium found” 的錯誤,
但是如果 d:\ 是一般硬碟就不會有這個問題,建議可以先更改光碟機代號成非 d:\ ,例如 e:\~ z:\.
設定光碟機代號:
〝控制台〞->〝系統管理工具〞->〝電腦管理〞->〝磁碟管理〞選擇要改變的硬碟按〝滑鼠右鍵〞->〝變更磁碟機代號及路徑(改成 e:\~ z:\)〞.
沒有留言:
張貼留言