我试图在Contiki上编译一个项目,但我有以下错误:
/usr/lib/gcc/msp430/4.5.3/../../../../msp430/bin/ld: dora_main.sky section `.data' will not fit in region `rom'
/usr/lib/gcc/msp430/4.5.3/../../../../msp430/bin/ld: section .vectors loaded at [0000ffe0,0000ffff] overlaps section .data loaded at [0000ff0c,00010131]
/usr/lib/gcc/msp430/4.5.3/../../../../msp430/bin/ld: region `rom' overflowed by 338 bytes
collect2: ld returned 1 exit status有人告诉我我必须减少ROM分区。是真的吗?我怎么能这么做?
发布于 2015-02-14 20:26:26
您的项目对于MSP430s内存来说太大了。
您的选项基本上是修剪二进制文件,或者如果幸运的话,您必须更新编译器才能使用所有设备内存。
1.修整二进制文件
-0s进行编译2.使用MSP430X
如果MSP430的闪存超过32 32kByte (例如,MSP430F5335),则可以使用makefile中的下列标志更改内存模型:
CFLAGS += -mmemory-model=large \
-ffunction-sections -fdata-sections \
-mcode-region=far -mdata-region=far
LDFLAGS += -mmemory-model=large \
-Wl,-gc-sections \
-mcode-region=far -mdata-region=far这将使您的代码和数据通过16位边界使用设备支持的所有内存。有关如何执行此操作的更多信息,请参见Contiki的MSP430X部分。
https://stackoverflow.com/questions/27818056
复制相似问题