Difference between revisions of "Troubleshooting"

From Contiki
Jump to: navigation, search
(= Problem with compling)
(Problem with compling)
Line 79: Line 79:
  
 
             LD        example-netflood.sky
 
             LD        example-netflood.sky
             /usr/lib/gcc/msp430/4.6.3/../../../../msp430/lib/mmpy-16/libc.a(rand.o):(.debug_info+0xd3): relocation truncated to fit: R_MSP430_16_BYTE against `no symbol'
+
             /usr/lib/gcc/msp430/4.6.3/../../../../msp430/lib/mmpy-16/libc.a(rand.o):(.debug_info+0xd3):  
 +
            relocation truncated to fit: R_MSP430_16_BYTE against `no symbol'
 
             collect2: ld returned 1 exit status
 
             collect2: ld returned 1 exit status
 
             make: *** [example-netflood.sky] Error 1
 
             make: *** [example-netflood.sky] Error 1

Revision as of 15:57, 25 April 2014

Back to Main Page

Permission denied

If you try to connect to a mote and receive a permission error, you may need to add yourself to the dialout group. The error may look something like the following:

/home/user/contiki/tools/sky/serialdump-linux -b115200 /dev/ttyUSB0
connecting to /dev/ttyUSB0 (115200)
/dev/ttyUSB0: Permission denied
make: *** [login] Error 255

Use the following command (replace <username> with your account):

sudo adduser <username> dialout

-OR-

sudo usermod -a -G dialout <username>

These two commands are equivalent. They both will add username to the dialout group. You will then have to re-login to or reboot your computer for the changes to take effect. You should now have read/write permissions to your USB serial devices. It is not necessary to remove any packages.


Issue with make login

If you are trying to execute the serial-dump application (contiki/tools/sky/serialdump-linux) and see the message: "No such file or directory" or "Command not found", it means that you are running in a 64-bit operating system that does not have proper 32-bit libraries installed. Since serialdump-linux is a pre-compiled 32-bit tool you need to execute the following command to install the necessary libraries:

sudo apt-get install ia32-libs

If the above does not work

Then, try few commands like:

 ldd serialdump-linux

The output look similar to the following:

 ldd serialdump-linux
       linux-gate.so.1 =>  (0xf772d000)
       libc.so.6 => /lib32/libc.so.6 (0xf75b4000)
       /lib/ld-linux.so.2 (0xf772e000)

Then it means that you have to install 32-bit packages. Remember to add i386 architecture or you won't be able to install 32-bit packages:

 sudo dpkg --add-architecture i386
 sudo apt-get update
 sudo apt-get install ia32-libs
Problem with compling

If you get an error in the linking there may be 2 possible places u need to check to correct them.

           LD        example-netflood.sky
           /usr/lib/gcc/msp430/4.6.3/../../../../msp430/lib/mmpy-16/libc.a(rand.o):(.debug_info+0xd3): 
           relocation truncated to fit: R_MSP430_16_BYTE against `no symbol'
           collect2: ld returned 1 exit status
           make: *** [example-netflood.sky] Error 1


First, check the line near 132 in file : contiki/cpu/msp430/Makefile.msp430

which looks like the following

        CFLAGSNO = -Wall -mmcu=$(CC_MCU) -g $(CFLAGSWERROR)

and delete the option “-g”.

The line should look like :

       CFLAGSNO = -Wall -mmcu=$(CC_MCU) $(CFLAGSWERROR)

Use the second one if the first doesnot work.

Second one is go to the make file of the currently compling program and remove the line which looks similar to the following.

       CFLAGS += -g