Hello @ben_chin,
We don't support IAR EW 9.40.1, please contact IAR Systems https://www.iar.com/support
But I can reproduce the same error In S32DS if the macro is defined in the C compiler preprocessor only.
You need to define the macro in both the C compiler preprocesor and the Assembler preprocessor.
danielmartynek_0-1756278593837.png
danielmartynek_1-1756278632199.png
Regards,
Daniel