AnsweredAssumed Answered

HC08: new user of codewarrior

Question asked by javier cuesta on Sep 21, 2006
Latest reply on Sep 26, 2006 by javier cuesta

HI, this is my first day working with codewarrior and its the first time i found an understandable problem... although supose it will not be the last :smileyhappy:.

I was trying to develop a very simple program in wich i try to load a program into a development board and execute it, the program only pretend to initialice the Uart and send some simple message to the computer, here it is:

#include <hidef.h> /* for EnableInterrupts macro */

#include "Uart.h" /*UART functions*/

void main(void) {

uint8 contador=0;

EnableInterrupts; /* enable interrupts */

/* include your code here */

 

Uart_init(); /*Uart inicialization*/

 

Uart_Print("Hello word!!!.\n\n");

 

/*going to try something a bit more complex*/

 

for(;:smileywink:{

 

Timer_Reset();

// Wait until timer has reached a certain value

while(Timer_Get() < 20) {}

Uart_Print("still here\n");

}

 

/*never get here*/

 

for(;:smileywink: {

__RESET_WATCHDOG(); /* feeds the dog */

} /* loop forever */

/* please make sure that you never leave main */

}

The problem is that after adding all .h that were requested by the UART.h (i took them from an example of yours) and compiling the program it gives an error "expected ; in line 132 of Uart.h"

I didnt touched that function and it seems to compile well in your example, im assuming that im missing something before including that library but i have no clue what could it be, maybe i forgot something basic and you can help me with it.

Thanks for your time.

Message Edited by CrasyCat on 2007-04-13 01:54 PM

Outcomes