cancel
Showing results for 
Search instead for 
Did you mean: 

I wrote a custom factory configuration file (.cfg) for a stm32 board with the factory variable values to be used in the code. This way I can change the variables without actually changing the code. How to generate the .bin for the configuration file?

carla
Associate II
 
3 REPLIES 3

Put the configuration specific stuff in a structure, store that in a different section of flash than you use for your code. Copy the content in to a RAM side copy. Update that and write back to flash as needed. And recognize this data is missing, and prompt for it during factory programming, or write viable defaults pending new/specific information.

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

I am new to this so I have no experience on how to go about this. The reason there is a .cfg file is because the values can easily be set by someone who does not know anything about code. I am just not sure how the .cfg file would be converted to a .bin file that will be flash loaded to the board.

I am new to this so I have no experience on how to go about this. The reason there is a .cfg file is because the values can easily be set by someone who does not know anything about code. I am just not sure how the .cfg file would be converted to a .bin file that will be flash loaded to the board.

PS I meant to reply, but accidentally wrote an answer and can’t delete it lol