??? 06/25/06 10:53 Read: times |
#119046 - Problem with porting code Responding to: ???'s previous message |
Hi Dear,
I have a little problem, hope you can help me in this regard. I have this simple program. #define ALLOCATE_EXTERN #include <fx2.h> #include <fx2regs.h> 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 initialized to mode 1 n 2 resp TH1 = 0xEC; // Reload value for 9600 baud rate at 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; } } } this is sending the continuous data. When i compile this program using Keil software on windows environment and upload the .hex file onto the EZ USB FX2 board using fxload, its working fine. But the problem is that when i use the same program and compile using sdcc, it gives me the error message like ; missing in line bla bla.... but if omit the include<fx2.h> then program compiles but does not seem to work properly. I hope you can help me to fix the stuff Best Regards Muhammad Imran The Netherlands |
Topic | Author | Date |
SDCC and Keil C compatibility | 01/01/70 00:00 | |
major differences | 01/01/70 00:00 | |
ansi incompatabilities | 01/01/70 00:00 | |
SDCC vs keil | 01/01/70 00:00 | |
other way round :) | 01/01/70 00:00 | |
SDCC vs Keil Part 2 | 01/01/70 00:00 | |
actualy | 01/01/70 00:00 | |
thanks | 01/01/70 00:00 | |
sfr declarations NOT compatible | 01/01/70 00:00 | |
too bad | 01/01/70 00:00 | |
Perhaps it is? | 01/01/70 00:00 | |
indeed | 01/01/70 00:00 | |
it almost is | 01/01/70 00:00 | |
the root of many evils | 01/01/70 00:00 | |
Another important difference! | 01/01/70 00:00 | |
fast & efficient code | 01/01/70 00:00 | |
Problem with porting code | 01/01/70 00:00 | |
bla bla | 01/01/70 00:00 | |
semicolon missing | 01/01/70 00:00 | |
set TI=1 in your init_uart() | 01/01/70 00:00 | |
Have you looked at this? | 01/01/70 00:00 | |
General Tip: Disable all extensions![]() | 01/01/70 00:00 |