Code Conversion
2005-04-08 by Chuck Hackett
I have purchased an ATMega16 based board to connect a project to the Internet.
I'm attempting to compile my first real embedded program. The example code that
came with the board was written for ImageCraft's ICCAVR Pro C compiler and I'm
currently converting it to WINAVR. I'm trying to digest all the documentation
but my unfamiliarity with both compilers is hampering me. If you would indulge
me with a couple of questions:
I have two functions that are being flagged with the following warning:
"function declaration isn't a prototype"
One is declared:
void overrun()
{
...
}
... and the other ...
void init_ASIX88796L()
{
...
}
Both functions are declared prior to their first use and there are other "void
funct()" functions which do not cause warnings.
- What exactly is this trying to tell me?
- Where can I find descriptions of the various warnings and errors from WINAVR?
I came across a couple of occurrences of:
do{
...
result = byte_read & RDC;
}while (result = 0);
Shouldn't "while (result = 0)" be "while (result == 0)" ?
If I understand it correctly I should convert the following code:
#pragma interrupt_handler USART_RX_interrupt:iv_USART_RX
...
void USART_RX_interrupt( void )
{
...
}
... to ...
SIGNAL(SIG_USART_RECV)
{
...
}
Are there general guidelines available on the Internet concerning converting
ImageCraft's ICCAVR Pro C code to WINAVR?
Thanks in advance for your help.
Cheers,
Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844
http://www.whitetrout.net/Chuck