I am compiling code for Microchip dspic33 series processors using Microchip's XC16 compiler.
I have some code that is used in several applications (i.e. it is in a code library). For certain modules, I want to ensure that certain compiler flags are set during compilation, ideally using the pre-processor. In particular, I am interested in testing for the -mauxflash and -code-in-auxflash target flags.
Is there a way to test for compiler options during compilation?
I have tried dumping all the #defines using xc16-gcc -dM -E - < /dev/null, but nothing seems to change. There are 3 defines related to auxflash (AUXFLASH_LENGTH, __AUXFLASH_BASE, and __HAS_AUXFLASH), but nothing related to the target flags.