Error: "undefined reference to ‘__udivsmodsi4" when switching compilers in Contiki 2.6

584 views Asked by At

I am switching from contiki 2.7 to contiki 2.6 but have found that the sky-shell-exec example does not build with msp430-gcc 4.5.3 in contiki 2.6. To get around this while using contiki 2.6 I am trying to install msp430-gcc 4.6.3.

I have downloaded the deb package for 4.6.3 from http://helpdesk.jogjaprov.go.id/ubuntu/pool/universe/g/gcc-msp430/

and have used the following commands to try and install it:

sudo apt-get remove gcc*
sudo apt-get remove gcc-msp430
sudo dpkg --force-all -i ~/Downloads/gcc-msp430_4.6.3~mspgcc-20120406-3_i386.deb
sudo apt-get -f install

When I do a msp430-gcc --version it returns:

msp430-gcc (GCC) 4.6.3 20120301 (mspgcc LTS 20120406 unpatched) 

So it seems that it has worked...

However, when I try to do a make sky-shell-exec.sky TARGET=sky in examples/sky-shell-exec/ I get two following error:

usr/lib/gcc/msp430/4.6.3/../../../../msp430/lib/mmpy-16/libc.a(vuprintf.o): In function `vuprintf':
/build/buildd/msp430-libc-20110612/src/./stdlib/vuprintf.c:387: undefined reference to `__udivmodsi4'
/build/buildd/msp430-libc-20110612/src/./stdlib/vuprintf.c:397: undefined reference to `__udivmodsi4'
collect2: ld returned 1 exit status
make: *** [sky-shell-exec.sky] Error 1

I thought at first thought that this might mean that my system has two different versions somehow tangled. But, I haven't been able to confirm or deny this. I have check my version output with that found at http://www.george-smart.co.uk/wiki/Installing_Contiki and everything is the same except that my output says "... --build=i686-linux-gnu ..." instead of "... --build=x86_64-linux-gnu ..."

My questions are:

1) What am I doing wrong?

2) How does one switch msp430-gcc compilers from 4.5.3 to 4.6.3 to work with contiki 2.6?

Thanks!

0

There are 0 answers