2021-09-22 02:27 PM
I'm looking for something like __TARGET_ARCH_6_M or __ARM_ARCH_6M__ from my G0 project but don't see anything. Is this done by the IDE based on the selected target hardware, or would I need to add a preprocessor macro manually to my project?
2021-09-23 12:09 AM
CubeIDE is based on CMSIS and CMSIS is in turn managed by ARM.
__TARGET_ARCH_6_M and other defines are handled in CMSIS, which also derives other defines from them, here e.g. __ARM_ARCH_6M__.
You don't have to add this to your project as CubeIDE usually already knows which target you are using.
If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.
/Peter
2021-09-23 08:59 AM
That's what I would have thought as well, but it seems like neither __TARGET_ARCH_6_M nor __ARM_ARCH_6M__ are defined in my project (any code wrapped in these #defines is removed)