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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/04/11 09:25
Read: times


 
#185012 - SDCC's headers can be adapted
Responding to: ???'s previous message
The stdint.h from SDCC seems to work ok however I personally would not trust the pointer types and widths.

However in a context of a 8051 MCU, I’d rather introduce my own data type for pointers anyway due to the different possible memory spaces. A generic pointer will have to carry section information that has to be evaluated at runtime. A special typed pointer won’t waste as many resources.

The stdbool.h from SDCC can be used as well. Just make sure to be Keil compatible and use the following definitions:

#define _Bool bit
#define BOOL bit
#define bool _Bool
#define __bool_true_false_are_defined 1

 


I leave the task of copying and/or adopting the files as an exercise to the readers. It works for me to have bool, and *int_*_t types at hand.


List of 13 messages in thread
TopicAuthorDate
stdint.h for Keil C?            01/01/70 00:00      
   ! StdInt.h            01/01/70 00:00      
      Make one            01/01/70 00:00      
         Ofcourse            01/01/70 00:00      
            SDCC's headers can be adapted            01/01/70 00:00      
               That's the problem...            01/01/70 00:00      
   So just write one!            01/01/70 00:00      
   Does Keil claim C99 compliance at all?            01/01/70 00:00      
      They have a statement on this...            01/01/70 00:00      
         C90 conformance - not C99.            01/01/70 00:00      
            I personally don't need full C99 compliance            01/01/70 00:00      
               Yes possible. But maybe not economical.            01/01/70 00:00      
               Not difficult            01/01/70 00:00      

Back to Subject List