Skip to main content
yang hong
Associate III
September 17, 2019
Question

firmware version information

  • September 17, 2019
  • 1 reply
  • 413 views

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.

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
September 17, 2019

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 VenmoUp vote any posts that you find helpful, it shows what's working..