cancel
Showing results for 
Search instead for 
Did you mean: 

firmware version information

yang hong
Associate II

Hello,

I am using NUCLEO-F429ZI. I would like to add my application name, author, firmware version and so on information into application profile, how can I add them when I compile the program and save these information into controller?

thank you.

1 REPLY 1

You'd typically use strings, and mark them so the linker doesn't discard them

#ifdef __ICCARM__        //IAR

#define KeepInCompilation __root

#elif __CC_ARM          //MDK-ARM

#define KeepInCompilation __attribute__((used))

#else //TASKING        //TrueStudio

#define KeepInCompilation __attribute__((used))

#endif

KeepInCompilation static const char foo[]= "Firmware XYZ, Written by ABC";

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..