I'm working on a simple project and trying to make it work for both STM32CubeIDE and Keil uVision. Building in uVision, in *my* files __CC_ARM is not defined. If I manually define it on the Target1 Options C Compiler form, then I get a million errors says that it is already defined in *other* files. Other files meaning supplied things like
stm32f10x.h(483): warning: In file included from...
I can see that in "core_cm3.h" it is already defined (magically).
Ideas??
I noticed someone doing this:
#if defined(__CC_ARM) || defined(__ARMCC_VERSION)
__GNUC__:Set when you specify the --gnu option. It is an integer that shows the current major version of the GNU mode being used.(In Keil this is set under Project -> Options For Target ->C/C++ tab, check "GNU extensions"__CC_ARM:Always set to 1 for the ARM compiler, even when you specify the --thumb option.See:www.keil.com/.../armcc_chr1359125007083.htmIf you look in your code, did anyone undefine the __CC_ARM? Maybe with a command like:www.keil.com/.../armcc_chr1359124947379.htm
Note: nowadays, if you want to make sure your code works for Arm Compiler 5 only, we do something like:
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 5060020)
No undefines are done in my code (I'm the only one here to blame). I did read that stuff. The control strings are totally different, but I guess you'd expect that with a different compiler. Any way to get away from GCC? I don't understand the origin of the control strings.
I will open an older version of my project and compare in case something got clobbered on my end. At the moment I'm just selecting one compiler or the other using the drop-down and I wouldn't have even gone there had I not hit this issue.
Maybe this an MDK Lite thing. We're being kicked to the curb. :-(