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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/24/10 09:39
Read: times


 
#176146 - seems you feed SDCC with a Keil specific header file
Responding to: ???'s previous message
Well this is probably a FAQ.

Keil specific header files typically contain lines like:

sfr P0 = 0x80; /* Port-0 */

this produces the somewhat expected (C'ish) result (and the
somewhat unexpected result if you are familiar with Keil's
notation) of assigning the value 0x80 to P0.

> mov 29h,#80h

(For SDCC there is no specific address given for P0 so
locates all those variables in the header file at consecutive
addresses in data memory. Which is what you are seeing in
your disassembled code)


Compiler agnostic header files had on this forum f.e. been discussed here:
http://www.8052.com/forumchat/read/116161


SDCC manual 3.4.1.7 "sfr / sfr16 / sfr32 / sbit" says:

... Please note, if you use a header file which was written for another compiler then the sfr / sfr16 / sfr32 / sbit
Storage Class extensions will most likely be not compatible. Specifically the syntax sfr P0 = 0x80; is
compiled without warning by SDCC to an assignment of 0x80 to a variable called P0!
Nevertheless with the file compiler.h it is possible ...


List of 51 messages in thread
TopicAuthorDate
SDCC debug            01/01/70 00:00      
   version            01/01/70 00:00      
      2.9.0 #5416            01/01/70 00:00      
         humm            01/01/70 00:00      
            files            01/01/70 00:00      
               General Comments            01/01/70 00:00      
                  stating the problem            01/01/70 00:00      
               why would that be impossible?            01/01/70 00:00      
                  omf smaller than hex            01/01/70 00:00      
                     link, please            01/01/70 00:00      
                        links            01/01/70 00:00      
   played with the commandline options and ...            01/01/70 00:00      
      What do you mean by "blows in startup"?            01/01/70 00:00      
         goes to undefined memory and never reaches main            01/01/70 00:00      
            try one of these options            01/01/70 00:00      
               Thanks, It'll be a day or two            01/01/70 00:00      
                  SiLabs or not            01/01/70 00:00      
                     yes, SILabs            01/01/70 00:00      
                        breakpoint            01/01/70 00:00      
   found a cause, but ....            01/01/70 00:00      
      disassembly            01/01/70 00:00      
      not having _sdcc_external_startup            01/01/70 00:00      
      seems you feed SDCC with a Keil specific header file            01/01/70 00:00      
         false entry, sorry            01/01/70 00:00      
         reply            01/01/70 00:00      
            legal C reused by Keil            01/01/70 00:00      
               3 questions            01/01/70 00:00      
                  3 answers            01/01/70 00:00      
                     thnks for 3 answers and more stuff            01/01/70 00:00      
                        incomplete            01/01/70 00:00      
               since 'porting' to SDCC ...            01/01/70 00:00      
                  agreed!            01/01/70 00:00      
   neither works, what do I do            01/01/70 00:00      
      no problem at my place            01/01/70 00:00      
   I ma stuck on the next one            01/01/70 00:00      
      strings in C            01/01/70 00:00      
         Thanks, Jan ....            01/01/70 00:00      
            that's the kosher way            01/01/70 00:00      
         No, the string shall fit according to the C standard            01/01/70 00:00      
            indeed            01/01/70 00:00      
      bug found            01/01/70 00:00      
         read again            01/01/70 00:00      
         somehow the SDCC forum did not take my post...            01/01/70 00:00      
            sdcc.exe does return an error status            01/01/70 00:00      
               why would you think that?            01/01/70 00:00      
                  grep etc            01/01/70 00:00      
                     Unix goodies            01/01/70 00:00      
            sdcc forum post visible            01/01/70 00:00      
               what are you doing diffrently?            01/01/70 00:00      
                  DOS bat command gotcha            01/01/70 00:00      
                     Thanks Jan            01/01/70 00:00      

Back to Subject List