We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I want to migrate my projects from Keil Arm Compiler V5 to V6.
According to this tutorial the language extensions need to be revised in the code.
https://www.keil.com/appnotes/files/apnt_298.pdf
What will be the recommended preprocessor definition to identfy the compiler?
Example:
#if defined(__ARM_COMPILER_V5__)
#define __WEAK__ __weak
#define __PACKED__ __packed
#endif
#if defined(__ARM_COMPILER_V6__)
#define __WEAK__ __attribute__((weak))
#define __PACKED__ __attribute__((packed))
Thank you for the quick reply.
I have already found the listed documents and links. However, the directives listed there did not seem to me to be goal-oriented or too complex. The __CC_ARM and __GNUC__ directives have not been found to be reliable. I'll try __ARMCC_VERSION then.