First, it is improper ettiquite in this list to post messages in
anything but plain text.

At first glance, it looks to me like you are missing the "main"
function.
As for the IRQ declaration you listed, there is nothing wrong with it.
After declaring two variables, it compiled for me fine, but not without
a "main" function.

Not sure if the requirement for including a main() function is in the
documentation or not, but it is a general requirement for all C
programs.  
The docs do talk about the possibly of calling some other function from
the startup code (auto-generated by the compiler to get things going),
but the default is to call main().

Good luck
-Mark


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Blake Bob
Sent: Wednesday, June 11, 2003 10:26 AM
To: [email protected]
Subject: [Mspgcc-users] interrupt problems


Hello, I am porting some code from IAR to GCC, and I am getting a
strange error message on one of my interrupts. I read the GCC help and
think that I changed the code correctly, but the error is still there.
Here's the code: 

interrupt (UART1TX_VECTOR) usart1_tx(void) { 
char next; 
switch (chars_left) { 
case -1: //Writing null-terminated string 
next = *(++tx_buffer); 
if (next != 0) { 
TXBUF1 = next; 
} else { 
chars_left = 0; 
} 
break; 
case 0: //Nothing left to write 
break; 
default: //Writing fixed length data 
next = *(++tx_buffer); 
TXBUF1 = next; 
chars_left--; 
break; 
} 
return; 
} 

and the error that I get is
"C:/mspgcc/bin/../lib/gcc-lib/msp430/3.2.3/msp2/libgcc.a(_reset_vector__
.o)(.init+0x38): In function '_reset_vector__':: undefined reference to
'main' 

Anyone know what this error means? 



MSN 8 helps ELIMINATE E-MAIL VIRUSES. Get 2 months FREE*.
------------------------------------------------------- This SF.net
email is sponsored by: Etnus, makers of TotalView, The best thread
debugger on the planet. Designed with thread debugging features you've
never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________ Mspgcc-users mailing
list [email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users 


Reply via email to