2

I am currently trying to compile a program with the following commands in Contiki for the tmote sky platform:

1) "make sky-shell-exec.sky TARGET=sky"

2) "make sky-shell-exec.sky CORE=sky-shell-exec.sky TARGET=sky"

I get that the first command works but that the second errors out with the following:

"contiki-sky.a(symbols.o):(.rodata+0x1f00): relocation truncated to fit: R_MSP430_16_BYTE against symbol '_efartext' defined in ABS section in sky-shell-exec.sky

contiki-sky.a(symbols.o):(.rodata+0x1f1c): relocation truncated to fit: R_MSP430_16_BYTE against symbol '_vectors_end' defined in .vectors section in sky-shell-exec.sky"

My msp430-gcc version is 4.7.0 20120322 (mspgcc dev 20120716).

I tried looking around but didn't find this error anywhere.

I assume that this means my symbol table is out of space and I should condense code. I have tried doing just this and am at a point where I can't reduce the code base anymore. Am I right in thinking this?

Does anyone know what this means and possibly of a way to fix it?

Thanks!

John Cast
  • 1,771
  • 3
  • 18
  • 40
  • I have tried getting rid of the -g option at line 132 in Makefile.msp430 as in this fix: http://sourceforge.net/p/contiki/mailman/contiki-developers/thread/BAY152-W27DAD487578FF79D077833E0F50@phx.gbl/ However, this hasn't helped. – John Cast Nov 06 '14 at 03:37
  • Unrelated to Contiki: had that problem in my project and solved with option -gdwarf-3 instead of -ggdb. – mgruber4 Mar 02 '19 at 14:49

2 Answers2

1

It turns out my error was more specific to my working code base than I had thought. I was using a modified version of contiki 2.6 with msp430-gcc 4.7.0. I had had a VM with instant contiki 2.7 and then branched the modified contiki 2.6 to work on while on the same VM. msp430-gcc 4.7.0 works fine for contiki 2.7 but when I went to work on my branch of contiki 2.6 everything broke. The issue to my best guess was arising out of differences in Makefile.include between the two code bases. I am assuming contiki 2.6 wasn't built for msp430-gcc 4.7.0 in mind. So to work on 2.6 I am currently switching to msp430-gcc 4.5.3 and making a completely separate VM for contiki 2.6, which seems to be working so far... though with some issues in the sky-shell-exec example. So I will probably end up using msp430-gcc 4.6.3 instead.

John Cast
  • 1,771
  • 3
  • 18
  • 40
  • I was also having msp430-gcc 4.6.x. It was giving same compilation error with contiki 2.6. But its compiling contiki 2.7 successfully. – rashok Apr 28 '16 at 03:50
0

I have not dealt with this platform, but first build without debug configuration. Next can you check the linker file.

arapEST
  • 491
  • 1
  • 4
  • 16
  • Could you explain a little more what you mean? If by debug you mean deleting the -g option from CFLAGSNO so that: CFLAGSNO = -Wall -mmcu=$(CC_MCU) -g $(CFLAGSWERROR) becomes: CFLAGSNO = -Wall -mmcu=$(CC_MCU) $(CFLAGSWERROR) in my Makefile.msp430 file, then I think I have tried what you are saying. This is explained here: http://sourceforge.net/p/contiki/mailman/contiki-developers/thread/BAY152-W27DAD487578FF79D077833E0F50@phx.gbl/. – John Cast Nov 06 '14 at 07:29
  • Also, could you explain how to check the linker file and for what would I be looking for when checking it? – John Cast Nov 06 '14 at 07:33