Hi All, I have a little problem, hope you can help me in this regard.
I have this simple program. this is sending the continuous data usin UART0 of the EZ USB FX2.
#define ALLOCATE_EXTERN #include #include
void init_fx2(void); void init_uart(void);
void init_uart(void){
SCON0 = 0x52; // 8 bit UART mode TMOD = 0x21; // Timer 0 and Timer 1 are initialize to mode 1 n 2 resp TH1 = 0xEC; // Reload value for 9600 baud rate a
48MHz clock T1M = 1; SMOD1 = 1; TR1 = 1; // Start the Timer 1 }void main(void) { char a = 0x41; // Character A init_uart(); while(1){ while(TI){ TI = 0; SBUF0 = a; } } }
When i compile this program using Keil software on windows environmen and upload the .hex file onto the EZ USB FX2 board using fxload, it working fine. But the problem is that when i use the same program an compile using sdcc, it gives me the error message like missing ; in lin bla bla.... but if omit the include then program compiles and makes the .ih file but when i upload this file, it does not work at all.
I hope to help me in this regard
Best Regards Muhammad Imran