I'm writing an application that will target multiple platforms, however not all the code can be made generic. For these sections I will macro guard the platform specific code, however I can't find the right pre-processor macro for Blackfin parts. Is there a preferred macro I should be using?
There are a few macros defined for Blackfin and there isn't one we favour over others.
To get a full list of macros defined during the execution of the pre-processor, try the following command:
bfin-uclinux-gcc -mcpu=bf537-0.2 -E -dM - </dev/null
or to get only Blackfin specific macros:
bfin-uclinux-gcc -mcpu=bf537-0.2 -E -dM - </dev/null | grep -i -e bf -e black
By default, I tend to use "__bfin".
i recommend __bfin__ to people as that is what most open source projects use