我在 InstantContiki2.6 中将 msp430-gcc 更新到 4.7.0 版本。
当我模拟 hello-world示例时,它显示以下错误:
> make hello-world.sky TARGET=sky
msp430-gcc -DCONTIKI=1 -DCONTIKI_TARGET_SKY=1 -Os -fno-strict-aliasing -ffunction-sections -Wall -mmcu=msp430f1611 -g -I. -I../../platform/sky/. -I../../platform/sky/dev -I../../platform/sky/apps -I../../platform/sky/net -I../../cpu/msp430/f1xxx -I../../cpu/msp430/. -I../../cpu/msp430/dev -I../../core/dev -I../../core/lib -I../../core/net -I../../core/net/mac -I../../core/net/rime -I../../core/net/rpl -I../../core/sys -I../../core/cfs -I../../core/ctk -I../../core/lib/ctk -I../../core/loader -I../../core/. -I../../platform/sky/ -DAUTOSTART_ENABLE -c hello-world.c -o hello-world.co
msp430-gcc -DCONTIKI=1 -DCONTIKI_TARGET_SKY=1 -Os -fno-strict-aliasing -ffunction-sections -Wall -mmcu=msp430f1611 -g -I. -I../../platform/sky/. -I../../platform/sky/dev -I../../platform/sky/apps -I../../platform/sky/net -I../../cpu/msp430/f1xxx -I../../cpu/msp430/. -I../../cpu/msp430/dev -I../../core/dev -I../../core/lib -I../../core/net -I../../core/net/mac -I../../core/net/rime -I../../core/net/rpl -I../../core/sys -I../../core/cfs -I../../core/ctk -I../../core/lib/ctk -I../../core/loader -I../../core/. -I../../platform/sky/ -MMD -c ../../platform/sky/./contiki-sky-main.c -o obj_sky/contiki-sky-main.o
msp430-gcc -mmcu=msp430f1611 -Wl,-Map=contiki-sky.map -Wl,--gc-sections,--undefined=_reset_vector__,--undefined=InterruptVectors,--undefined=_copy_data_init__,--undefined=_clear_bss_init__,--undefined=_end_of_init__ hello-world.co obj_sky/contiki-sky-main.o contiki-sky.a -o hello-world.sky
/usr/local/msp430/lib/gcc/msp430/4.7.0/../../../../msp430/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
rm obj_sky/contiki-sky-main.o hello-world.co
make: *** [hello-world.sky] Error 1
Process returned error code 2
我从以下网址读到这篇文章:msp430/bin/ld:找不到 -lc。
但 Sarwarul 并未透露详细答案。
有人有什么主意吗?
答案1
如果您选择的 mote 类型为 sky mote,则可能会发生这种情况。尝试打开与 cooja mote 相同的文件并进行编译,它仍可能有效...