2019-11-07 04:33 AM
I'm new at stm32 processors and have a question about firmware handling. At the moment I'm using an uint value for the firmware version and it seems not to be the correct way. So what's the right way for doing this? Is there a register where I can save this value?
My application: I have a PCB with a STM32F030C8TX processor, a lcd and several buttons on it. The PCB is updated by a hardware-engineer very often, so I end up with many firmware-versions for many different PCB's. With a button-combination the firmware gets printed on the lcd.
Is it possible to store the firmware-version somehow in the hex/elf/bin-file too, to be readable by a non software engineer? Maybe STM32CubeProgrammer can also show the version in the log window?
2019-11-11 11:36 PM
Hi Guys, thank you for your help!
I want to share my solution with you:
As I'm using Eclipse as IDE, I thought "Why not use build variables?". So I use a build variable as string. It's very easy to include that variable into the hex/bin/elf file name. I just have to clean the project before building it, if I update the version number. I can also use the build varible in the code as double. I simply convert it with sprintf to a string.
The only problem is, that someone could rename the output file, so I will follow your advice and try to write it into the vector too. I just have to find a way to use the build variable there.
Thank you all!