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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Matthias Arndt
12/04/11 02:25
Read: 727 times

#185012 - SDCC's headers can be adapted
Responding to: Matthias Arndt'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, Id 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 wont 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
stdint.h for Keil C?      Matthias Arndt      12/03/11 11:38      
   ! StdInt.h      Michael Karas      12/03/11 12:42      
      Make one        Per Westermark      12/03/11 15:11      
         Ofcourse      Matthias Arndt      12/04/11 01:51      
            SDCC's headers can be adapted      Matthias Arndt      12/04/11 02:25      
               That's the problem...      Andy Neil      12/05/11 14:29      
   So just write one!      Andy Neil      12/03/11 17:05      
   Does Keil claim C99 compliance at all?      Jan Waclawek      12/04/11 01:45      
      They have a statement on this...      Matthias Arndt      12/04/11 02:21      
         C90 conformance - not C99.      Per Westermark      12/04/11 05:32      
            I personally don't need full C99 compliance      Matthias Arndt      12/04/11 08:09      
               Yes possible. But maybe not economical.      Per Westermark      12/04/11 09:06      
               Not difficult      Andy Neil      12/04/11 14:36      

Back to Subject List