Jump to content
uberteck

Error using Energia - relocation truncated to fit

Recommended Posts

Hello

I'm doing a projet using a MSP430G2553, a humidity sensor and a GSM module Sim800L. 

In the moment that i'm trying to upload my code, it gives me the following errors: 

 

 

c:/.../energia-1.8.7e21/hardware/tools/msp430/bin/../lib/gcc/msp430/4.6.3\libcrt0.a(_copy_data.o): In function `__do_copy_data':

/root/mspgcc-20120406/BUILD/gcc/gcc/../../../gcc-4.6.3/gcc/config/msp430/crt0.S:195: relocation truncated to fit: R_MSP430_16_BYTE against symbol `__data_load_start' defined in *ABS* section in C:\Users\...\Envio_GPRS.ino.elf

GPRS.ino.cpp.o: In function `__static_initialization_and_destruction_0(int, int) [clone .constprop.1]':

GPRS.ino.cpp:(.text._Z41__static_initialization_and_destruction_0ii.constprop.1+0x18): relocation truncated to fit: R_MSP430_16_BYTE against `no symbol'

GPRS.ino.cpp:(.text._Z41__static_initialization_and_destruction_0ii.constprop.1+0x24): relocation truncated to fit: R_MSP430_16_BYTE against `no symbol'

GPRS.ino.cpp.o: In function `setup':

Envio_GPRS.ino.cpp:(.text.setup+0x2a): relocation truncated to fit: R_MSP430_16_BYTE against `no symbol'

Envio_GPRS.ino.cpp:(.text.setup+0x36): relocation truncated to fit: R_MSP430_16_BYTE against `no symbol'

Envio_GPRS.ino.cpp:(.text.setup+0x4c): relocation truncated to fit: R_MSP430_16_BYTE against `no symbol'

Envio_GPRS.ino.cpp:(.text.setup+0x60): relocation truncated to fit: R_MSP430_16_BYTE against `no symbol'

\Envio_GPRS.ino.cpp.o: In function `send_data()':

Envio_GPRS.ino.cpp:(.text._Z9send_datav+0x20): relocation truncated to fit: R_MSP430_16_BYTE against `no symbol'

Envio_GPRS.ino.cpp:(.text._Z9send_datav+0x36): relocation truncated to fit: R_MSP430_16_BYTE against `no symbol'

Envio_GPRS.ino.cpp:(.text._Z9send_datav+0x4c): relocation truncated to fit: R_MSP430_16_BYTE against `no symbol'

Envio_GPRS.ino.cpp:(.text._Z9send_datav+0x62): additional relocation overflows omitted from the output

 

After google it, i found that the solution was:

contiki/cpu/msp40/Makefile.msp430

near line 132 search for 

CFLAGSNO = -Wall -mmcu=$(CC_MCU) -g $(CFLAGSWERROR) and erase the (-g)

My problem is. I already installed the contiki and i can not find this line neither the cpu/msp40/Makefile.msp430.

Share this post


Link to post
Share on other sites

Again, this is memory overflow. Try with another MCU with larger Flash and RAM.

You need to dig into the data-sheets of the MCUs of the boards and compare the sizes of Flash and RAM memory.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×