|ARM Technical Support Knowledge Articles|
Applies to: General Topics
Information in this article applies to:
I know that I can setup a specific path to the toolchain which basically allows me to switch the tool chain version. This path setup is even stored in the *.UV2 project file. However, I would like to ensure that a specific toolset version is used for my project.
Can I check the version number in my source code?
You may use the predefined macro constant _ _ C51 _ _, _ _ CX51 _ _, _ _ C166 _ _, _ _ C251 _ _, or _ _ CA _ _ compiler
which returns the version number of the compiler. This version number can be verified using preprocessor directives as shown below:
#if (__C51__ < 700) || (__C51__ > 799) #error "Requires C51 Compiler V7.xx" #endif
It is enough when just one C source module contains this version number check, since uVision is using the same compiler version for all compilation runs.
Article last edited on: 2007-01-11 12:06:43
Did you find this article helpful? Yes No
How can we improve this article?