Hi!

I've never seen this style (!) of warnings/errors while working with MSPGCC.
So there are several possible reasons:

1) you are not using MSPGCC as the actual compiler in your IDE. The msp430 
header files are for use with mspgcc only. (unlikely, as there should be more 
errors then)
2) your IDE is postprocessing the compiler messages, transforming them into 
something that seems to lose some meaning (likely)
3) you're using a bad makefile (likely)
4) your path settings are wrong (likely)
(3+4 are exchangeable if it comes to header include paths)

The message "Error launching external scanner info generator 
(/opt/msp430/bin/msp430-gcc -mmcu=msp430x169 -E -P -v -dD 
/home/daniel/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c)"
seems to indicate that msp430-gcc cannot be executed
Or (if it is only the result of a compiler run failing with the other two 
messages) indicates that you're including the wrong include files.

The compiler/environment should be set up to use NONE of the normal include 
files used for normal C++ compilations. Set your IDE/makefile up to use ONLY 
the msp430 include files and any files you manually 
created local to your project.

in 'signal.h' the interrupt keyword is defined as a macro.
#define interrupt(x) void __attribute__((interrupt (x)))
Note the missing space between the keyword and the brackets. It makes a 
difference. You MUST remove the space in your code so the macro is detected and 
expanded. Else it is treated as an attribute keyword 
which has no meaning outside an attribute definition, making your function a 
plain vanilla function with an ignore warning.

In any case, using U1IE as interrupt vector is nonsense. U1IE refers to the 
interrupt enable register in which the interrupt enable flags for TX and RX 
need to be set if an interrupt is wanted. U1IE resolves to IE2 (on 
other devices it might be on IE1) which is defined as "volatile unsigned char 
IE2 asm(#0x0001)". Same for TA0IV_. You're surely never get the desired result 
if your functions address is stored into the interrupt enable 
register (enablign random interrupts) - if the flash tool can place it there at 
all, as it is outside flash area.

The proper  interrupt vector definition would be

interrupt(UART1RX_VECTOR) uart1rx_handler(void){

and don't forget to add

U1IE |= URXIE1;

to enable the Uart1 Rx interrupt (and then enable global interrupts in general)

Usage of TA0IV is a bit more complex. The interrupt vector for timera0 is 
TIMERA0_VECTOR and for timera1 is TIMERA1_VECTOR. TA0IV_ makes only sense in 
TIMERA1_VECTOR, as it indicates the number of the 
highest-priority interrupt that happened, except(!) for the timera0 interrupt 
which has its own independent vector and is not covered by TA0IV_

Most of this is covered in the proper MSP 1x device family document from TI.

JMGross


----- Ursprüngliche Nachricht -----
Von: Daniel Flor
An: [email protected]
Gesendet am: 27 Mai 2009 01:22:41
Betreff: [Mspgcc-users] Problem with interrupt

Hello,
I don't undertanding the problem, I put the follow routines of interrupt:

/ / Stopping by the burst of counting timerA
*interrupt (TA0IV_) trata_timer( void )*
{...}

/ / Function that handles ineterrupção by USART1
*interrupt ( U1IE ) trataIntUSART1( void )*
{...}

And appears the following warning for both:
Description    Resource    Path    Location    Type
*‘interrupt’ attribute directive ignored*    Estufa_20-05-09.c
Diamantina_20-05-2009    391    C/C++ Problem

I typed the following includes:*
**#define __MSP430__
#include <msp430x16x.h>
#include <signal.h>
#include <io.h>
#include <math.h>
#include <sys/ieeefp.h>**
*I typed the first and last lines because I had a problem with Endianness.

There was 3 other warnings that happened:

escription    Resource    Path    Location    Type
*Error launching external scanner info generator (/opt/msp430/bin/msp430-gcc
-mmcu=msp430x169 -E -P -v -dD
/home/daniel/workspace/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c)
*   Diamantina_20-05-2009        -1    C/C++ Problem

Description    Resource    Path    Location    Type
/*opt/msp430/msp430/include/math.h conflicting types for built-in function
‘cabs’*    Diamantina_20-05-2009        112    C/C++ Problem

Description    Resource    Path    Location    Type
/*opt/msp430/msp430/include/math.h conflicting types for built-in function
‘cabsf’*    Diamantina_20-05-2009        190    C/C++ Problem



Reply via email to