Shop OBEX P1 Docs P2 Docs Learn Events
Predefined macros — Parallax Forums

Predefined macros

viperfan7viperfan7 Posts: 10
edited 2015-02-17 09:10 in Propeller 1
Is there a list of predefined macros for SimpleIDE anywhere?

Comments

  • ersmithersmith Posts: 6,053
    edited 2015-02-06 13:18
    There's a rather long list of predefined macros, which can be obtained by running:
    echo | propeller-elf-gcc -dM -E -
    
    on the command line. Various command options (such as the memory model you're using, and whether doubles are 32 bits) will add or change some of the predefined symbols.

    The propeller specific symbols are:
    #define __PROPELLER__ 1
    #define __propeller__ 1
    /* memory model symbols; only one of these is defined */
    #define __PROPELLER_COG__ 1  /* only if -mcog is given */
    #define __PROPELLER_LMM__ 1  /* only if -mlmm is given; that's the default memory model */
    #define __PROPELLER_XMMC__ 1 /* only if -mxmmc is given */
    #define __PROPELLER_XMM__ 1 /* only if -mxmm is given */
    /* size of double: only one of these is defined */
    #define __PROPELLER_64BIT_DOUBLES__ 1 /* only if -m64bit-doubles is given (default) */
    #define __PROPELLER_32BIT_DOUBLES__ 1 /* only if -m32bit-doubles is given */
    /* others */
    #define __PROPELLER_USE_XMM__ 1 /* if some XMM memory model is in use */
    
  • Dave HeinDave Hein Posts: 6,347
    edited 2015-02-06 13:32
    viperfan7, can you be more specific about the predefined macros you are interested in? There are quite a few #define's in the *.h files in the SimpleIDE sub-directories.
  • viperfan7viperfan7 Posts: 10
    edited 2015-02-17 09:10
    Honestly, the first post answers it perfectly, I just want to have a list of them, using just the files that came with the learn package, and now I know of a way to generate the list myself, so thanks a ton everyone
Sign In or Register to comment.