Add the build release of the source code in the compilation

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Add the build release of the source code in the compilation

407件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by camargomarcior on Mon Dec 15 08:25:15 MST 2014
Hi,

To better control of the revision of the compiled code I want put in the display the build release of the code, it´s possible in the lpcXpresso ??

Marcio
0 件の賞賛
返信
3 返答(返信)

358件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Dec 16 00:53:19 MST 2014
There is nothing in LPCXpresso that will count build numbers, but if you can do this externally and set an environment variable, then you can pass that into LPCXpresso and set a compiler switch.

If your build number is store in an environment variable call "BUILD_NUM":

In the Compiler properties under "Symbols" define symbol
BUILD_NUMBER=${env_var:BUILD_NUM}


Then to use it in your source code, you need to do this
#define STR(x)#x
#define STRINGIZE(x)STR(x)

#define VERSION "(Build " STRINGIZE(BUILD_NUMBER) ")"

0 件の賞賛
返信

358件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by camargomarcior on Mon Dec 15 09:34:08 MST 2014
I´m sorry if I was not clear.

Per example, in lpcXpresso the release is LPCXpresso v7.5.0 [Build 254]. I think the value v7.5.0 is the version value and the 254 is the compilation version of the software.

I want to do the same process in my firmware, do you now if exist a macro or other type of parameter to use to do it ?

0 件の賞賛
返信

358件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Dec 15 08:48:36 MST 2014
I'm sorry but it is not clear what you are asking.

Do you want to add a version number string into your application? If so, where is the version number defined?
0 件の賞賛
返信