When it comes to embedded, what approaches to firmware configuration works well? My use-case is that I would like to provide configuration separately to flashing the firmware itself. Some thoughts I have are to flash data to a specific memory location, and serial port-based configuration via some protocol (perhaps via Bluetooth). Thanks.
You can have default settings in flash and copy them to eeprom on first boot. User then can override any setting in eeprom
I’m slightly confused by this as flash is a type of eeprom, right? Also, how does the user typically program the eeprom in this scenario. Thanks.
I’m slightly confused by this as flash is a type of eeprom, right?
From running program perspective, flash is a read only memory region. EEPROM can be modified while running code.
Also, how does the user typically program the eeprom in this scenario. Thanks.
Depends on hardware implementation. You have to write procedures / irq handlers.
You have default settings in flash. When you first flash your uc, code will check and see that EEPROM is empty (usually it's filled with 0xff or 0x00). You then copy settings from flash to EEPROM. User will change some settings which will only land on EEPROM.
This is same concept as in ChainMap in python.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.