AnsweredAssumed Answered

In Keil Assembler, detect the CPU name for conditional compiling

Question asked by Edge30 on Aug 14, 2014
Latest reply on Aug 14, 2014 by Clive One
I use a single assembly module for startup, but this module may be used for different CPUs of the STM32F4xxx family.
Since some micros have more memory than others, I need to set the Heap_Size differently depending on the CPU defined in the project "Target Device".
I tried this:

IF :DEF: STM32F427_437xx
Heap_Size EQU value1
Heap_Size EQU value2

However the first option is never taken even though I selected the target device correctly.
I have a similar construction in the C code and it works, but seems the macro name is no defined for assembly.

The idea is to make this as transparent as possible, I know I can add my own built compile option to define a name and use it but others would need to remember to change it every time and why would this be needed when Keil already knows the target device?

Any idea how to solve this? I guess if keil defines a macro automatically for C then it should do it also for assembler.