We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Common C51 & A51 headers are very useful. However, there seems to be no way to write code that is conditional upon command line defines that works for both the compiler and the assembler. For example, if I define the symbol _DEBUG on the command line, I can write -
$if _DEBUG Size set 100 ; ... $else Size set 50 ; ... $endif
#ifdef _DEBUG #define size 100 // ... #else #define size 50 // ... #endif
#ifdef __A51__ $if _DEBUG #define _DEBUG $endif #endif #ifdef _DEBUG // ... #endif
Thanks, bill