[riot-devel] hwtimer on msb-430h

Milan Babel babel at inf.fu-berlin.de
Wed May 15 10:33:01 CEST 2013


Hi,

when trying to use the hwtimer on the msb-430h I get this error during 
linking:

/home/milan/riot/RIOT/bin/cpu.a(hwtimer_cpu.o): In function 
`hwtimer_arch_init':
/home/milan/riot/RIOT/cpu/msp430-common/hwtimer_cpu.c:74: undefined 
reference to `timerA_init'
collect2: ld gab 1 als Ende-Status zurück
make: *** [all] Fehler 1

void timerA_init(void) is defined in 
RIOT/cpu/msp430x16x/hwtimer_msp430.c, the build of the object was 
successfull.

milan at MilanDebian:~/riot/projects/hello-world$ ls -al 
../../RIOT/bin/hwtimer*
-rw-r--r-- 1 milan milan  752 Mai 15 10:15 ../../RIOT/bin/hwtimer_cpu.d
-rw-r--r-- 1 milan milan 7676 Mai 15 10:15 ../../RIOT/bin/hwtimer_cpu.o
-rw-r--r-- 1 milan milan  525 Mai 15 10:15 ../../RIOT/bin/hwtimer.d
-rw-r--r-- 1 milan milan  712 Mai 15 10:15 ../../RIOT/bin/hwtimer_msp430.d
-rw-r--r-- 1 milan milan 6464 Mai 15 10:15 ../../RIOT/bin/hwtimer_msp430.o
-rw-r--r-- 1 milan milan 9600 Mai 15 10:15 ../../RIOT/bin/hwtimer.o

Is something missing like ar rcs $(RIOTBASE)/bin/hwtimer.a 
$(RIOTBASE)/bin/hwtimer*.o ?
But In Makefile.modules I found:

# exclude hwtimer, because it is part of the kernel but the define is 
needed for auto_init
export BASELIBS = $(shell echo $(BL)|sed 's/[^ ]*hwtimer.a//')

Full linker call is:

msp430-gcc /home/milan/riot/RIOT/bin/startup.o -o 
/home/milan/riot/projects/hello-world/bin/hello-world.elf 
-Wl,--start-group  /home/milan/riot/RIOT/bin/posix.a 
/home/milan/riot/RIOT/bin/cc110x_ng.a 
/home/milan/riot/RIOT/bin/cc110x_spi.a /home/milan/riot/RIOT/bin/cpu.a 
/home/milan/riot/RIOT/bin/core.a /home/milan/riot/RIOT/bin/sys.a 
/home/milan/riot/RIOT/bin/transceiver.a 
/home/milan/riot/boards/msb-430h/bin/msb-430h_base.a 
/home/milan/riot/projects/hello-world/bin/hello-world.a -lm 
-Wl,--end-group  
-Wl,-Map=/home/milan/riot/projects/hello-world/bin/hello-world.map 
-mmcu=msp430f1612 -lgcc /home/milan/riot/RIOT/bin/startup.o

Although I am using the hello-world project here, it uses the hwtimer 
(the hello-world project on github does not). However same error also 
appears at other projects which use the hwtimer.

used gcc version is:
msp430-gcc (GCC) 4.6.3 20120301 (mspgcc LTS 20120406 unpatched)

and used make version is:
GNU Make 3.81

RIOT is the current git version
milan at MilanDebian:~/riot/RIOT$ git show
commit 336667a43ad81a147f060971a13edc2f0c34b268
Merge: d56081d 666c90f
Author: Oliver Hahm <oleg at hobbykeller.org>
Date:   Mon Apr 22 00:55:46 2013 +0200

Can sombeody reproduce this, or has maybe even a solution?

Regards,
   Milan


More information about the devel mailing list