Page 1 of 1

MSP430 compilation error

Posted: Thu Feb 19, 2015 12:58 pm
by rpcaldeira
Hey guys, I'm trying to make a personal project with ChibiOS using a MSP430 processor and the opensource toolchain provided by TI. I've copied one of the demo projects and when compiling the first times I got some errors stating that some files are missing, namely the iomacros.h, in430.h and the msp430.h. The first two I got them from here: https://gist.github.com/RickKimball/130 ... iomacros-h , and the third one from the include folder from the toolchain msp430f1611.h. Now when I compile it, i get this error and I stuck. If anyone can help me I would appreciate it. Thanks, Rui

msp430-elf-gcc -c -mmcu=msp430x1611 -O2 -ggdb -fomit-frame-pointer -Wa,-alms=../ChibiOS-RT-master/os/hal/platforms/MSP430/serial_lld.lst -D__MSP430F1611__ -MD -MP -MF .dep/serial_lld.o.d -I . -I../ChibiOS-RT-master/os/ports/GCC/MSP430 -I../ChibiOS-RT-master/os/kernel/include -I../ChibiOS-RT-master/test -I../ChibiOS-RT-master/os/hal/include -I../ChibiOS-RT-master/os/hal/platforms/MSP430 -I../ChibiOS-RT-master/boards/TRENZ_0600_02 -I../ChibiOS-RT-master/os/various -I../AT86RF232_base/driver -I../AT86RF232_base/basicrf ../ChibiOS-RT-master/os/hal/platforms/MSP430/serial_lld.c -o ../ChibiOS-RT-master/os/hal/platforms/MSP430/serial_lld.o
In file included from ../ChibiOS-RT-master/os/hal/platforms/MSP430/hal_lld.h:28:0,
from ../ChibiOS-RT-master/os/hal/include/hal.h:36,
from ../ChibiOS-RT-master/os/hal/platforms/MSP430/serial_lld.c:26:
../ChibiOS-RT-master/os/hal/platforms/MSP430/msp430.h:1498:33: error: expected declaration specifiers or ‘...’ before ‘(’ token
#define USART0TX_VECTOR ( 9) /* 0xFFF0 USART 0 Transmit */
^
../ChibiOS-RT-master/os/hal/platforms/MSP430/isr_compat.h:63:28: note: in expansion of macro ‘USART0TX_VECTOR’
#define ISR(a,b) interrupt(a ## _VECTOR) b(void)
^
../ChibiOS-RT-master/os/ports/GCC/MSP430/chcore.h:204:30: note: in expansion of macro ‘ISR’
#define PORT_IRQ_HANDLER(id) ISR(id, ISRNAME(vect, id))
^
../ChibiOS-RT-master/os/kernel/include/chsys.h:219:28: note: in expansion of macro ‘PORT_IRQ_HANDLER’
#define CH_IRQ_HANDLER(id) PORT_IRQ_HANDLER(id)
^
../ChibiOS-RT-master/os/hal/platforms/MSP430/serial_lld.c:174:1: note: in expansion of macro ‘CH_IRQ_HANDLER’
CH_IRQ_HANDLER(USART0TX) {
^
../ChibiOS-RT-master/os/hal/platforms/MSP430/msp430.h:1499:33: error: expected declaration specifiers or ‘...’ before ‘(’ token
#define USART0RX_VECTOR (10) /* 0xFFF2 USART 0 Receive */
^
../ChibiOS-RT-master/os/hal/platforms/MSP430/isr_compat.h:63:28: note: in expansion of macro ‘USART0RX_VECTOR’
#define ISR(a,b) interrupt(a ## _VECTOR) b(void)
^
../ChibiOS-RT-master/os/ports/GCC/MSP430/chcore.h:204:30: note: in expansion of macro ‘ISR’
#define PORT_IRQ_HANDLER(id) ISR(id, ISRNAME(vect, id))
^
../ChibiOS-RT-master/os/kernel/include/chsys.h:219:28: note: in expansion of macro ‘PORT_IRQ_HANDLER’
#define CH_IRQ_HANDLER(id) PORT_IRQ_HANDLER(id)
^
../ChibiOS-RT-master/os/hal/platforms/MSP430/serial_lld.c:195:1: note: in expansion of macro ‘CH_IRQ_HANDLER’
CH_IRQ_HANDLER(USART0RX) {
^
make: *** [../ChibiOS-RT-master/os/hal/platforms/MSP430/serial_lld.o] Error 1

Re: MSP430 compilation error

Posted: Thu Feb 19, 2015 1:36 pm
by Giovanni
Hi,

The demos are compiled using the mspgcc toolcahin: https://sourceforge.net/projects/mspgcc/

The MSP430 has not been touched for a while now, it is possible that the TI toolchain you mentioned diverged by that compiler enough to trigger compatibility problems. From those errors it appears that there are differences in those headers.

Giovanni

Re: MSP430 compilation error

Posted: Thu Feb 19, 2015 2:21 pm
by rpcaldeira
It is working now. Thanks ;)