Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/09/06 19:23
Read: times


 
#109640 - 3 things
Responding to: ???'s previous message
Jani Tuomola said:
I can't get even this very easy code to work :) The problem is, that when I compile this code with Keil, evarything works fine. But when I use SDCC to compile it the serial transmitting doesn't work.

Sounds like you've taken a Keil example, then tried building it with SDCC.
It shouldn't really be a huge surprise that Keil's example works on Keil, but not some other arbitrary compiler.

With specialist embedded compilers like this, it's all in the language extensions offered by the specific tools - and they will differ between brands.
You're really quite lucky that it actually builds at all on two compilers!

Surely SDCC must have a simple "Hello, world" example?
Can you get that working on SDCC

I'm wondering what Keil does different when compiling that SDCC...

3 things spring immediately to mind:

1. have you checked that the definitions of T3CON, T3FD, etc, etc are correct for SDCC?

2. You haven't defined a memory space for 'a' - it is quite likely that Keil & SDCC choose different defaults...

3. The startup code will be different

As Jez says, have you tried debugging it, or running it in the simulator?

List of 8 messages in thread
TopicAuthorDate
SDCC and Uart problem            01/01/70 00:00      
   when you say it doesnt work...            01/01/70 00:00      
   stdio.h            01/01/70 00:00      
   and it will complian about ADuC845.h            01/01/70 00:00      
   rename 8052.h as ADuC845.h            01/01/70 00:00      
   3 things            01/01/70 00:00      
   header file            01/01/70 00:00      
      stupid me...            01/01/70 00:00      

Back to Subject List