Seems like no matter what I try the .ifdef does not work. It always takes the default path.
This happens with a symbol defined in the make settings as well as with symbols defined in any other way, including .equ and .set
Have you tried the specific AC6 forum?
OpenSTM32 Community Site | System Workbench for STM32
Try looking at the .LST and .MAP type files to check if the symbols your want are visible. I'd inspect the .OBJ (.O) files too, some command line stuff usually gets in them.
Try using the GNU/GAS outside of AC6 make sure it is not something specific to the chain, or makefile, etc.
This happens with symbols visible in the .map file as well as some not visible there. I even tried using a label that I used for memory access a few lines down in the code. Same result, .ifdef used the default path and the memory access worked.
Problem solved. When using ".S" as file type the C pre processor goes through the file. That way I moved the defines and ifdefs to the C pre processor.
Retrieving data ...