2015-10-01 05:11 AM
Hello,
I want to use a pre-processor directive for conditional compilation.I have a piece of code which I want to include when a pre-processor directive is defined. Where to define this in SPC5Studio? Which settings are required for this?
Thanks in advance for your reply.
Mike.2015-10-01 07:38 AM
Hello Mike ,
You can define in the Platform component by -D<DIRECTIVE_NAME> in CPP options Best regards Erwan2015-10-05 04:32 AM
1. I tried using the -D under cpp options. I wrote -D PASS1 and my code contains following statement,
#if defined(PASS1)#define Toggle_Pin() palTogglePad(PORT_B, TICK);#endifWith above option, I am expecting the above code should get enabled when I debug it. But I see that this part of code is disabled as it is not getting the required macro definition. Can you please clarify how to achieve this?2. Which document/user guide has this information listed for different build or runtime settings?Thanks.Mike.2015-10-06 02:36 AM