Hi!

Reading thread about uniarch mspgcc and because I need msp430G2553
support, installed it from Debian repo as suggested. Now I cannot get
interrupt syntax right and Googling doesn't help either. Error is:


tonu@hp:~/msp/temperature-demo$ make
msp430-gcc -Os -Wall -g -mmcu=msp430x2553 -c main.c
main.c:270:11: error: expected declaration specifiers or ‘...’ before
‘(’ token
main.c:270:1: warning: return type defaults to ‘int’
main.c: In function ‘interrupt’:
main.c:270:29: error: expected declaration specifiers before ‘ta0_isr’
main.c:294:1: error: expected declaration specifiers before ‘interrupt’
main.c:306:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token
main.c:315:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token
main.c:327:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token
main.c:335:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token
main.c:350:1: error: expected declaration specifiers before ‘interrupt’
main.c:368:1: error: expected declaration specifiers before ‘interrupt’
main.c:377:1: error: expected declaration specifiers before ‘interrupt’
main.c:380:1: error: expected ‘{’ at end of input
main.c: At top level:
main.c:91:24: warning: ‘delay’ used but never defined
main.c: In function ‘interrupt’:
main.c:380:1: warning: control reaches end of non-void function
make: *** [main.o] Error 1
tonu@hp:~/msp/temperature-demo$ 
tonu@hp:~/msp/temperature-demo$ cat Makefile 
CC=msp430-gcc
CFLAGS=-Os -Wall -g -mmcu=msp430x2553
#CFLAGS=-Os -Wall -g -mmcu=msp430x2231 --param inline-call-cost=2
# -fno-inline-small-functions -fno-split-wide-types -fno-tree-scev-cprop
-ffunction-sections -Wl,--gc-sections -Wl,--relax


OBJS=main.o


all: $(OBJS)
        $(CC) $(CFLAGS) -o main.elf $(OBJS)

%.o: %.c
        $(CC) $(CFLAGS) -c $<

clean:
        rm -fr main.elf $(OBJS)
tonu@hp:~/msp/temperature-demo$ 

In source I include just 

#include <msp430.h>

and interrupt code is:


interrupt(TIMERA1_VECTOR) ta1_isr(void)
{
    TACCTL1 &= ~CCIFG;
    if (applicationMode == APP_APPLICATION_MODE)
        LED_OUT &= ~(LED0 + LED1);
    else
        LED_OUT ^= (LED0 + LED1);

}


Any good web page to read? Suggestions how to fix error?
 
   Tõnu


------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to