ChameleonMini icon indicating copy to clipboard operation
ChameleonMini copied to clipboard

If no ENABLE_EEPROM_SETTINGS is used in MakeFile, a 0 byte eeprom is generated

Open tned73 opened this issue 6 years ago • 2 comments

Without the Makefile setting SETTINGS += -DENABLE_EEPROM_SETTINGS The application still reads the EEPROM for default settings and the LogInit function still uses EEPROM.

Due to the worn out EEPROM of my xmega, I wanted to run the application without a single EEPROM read or write.

This branch makes the .eep file has 0 bytes to write and every thing still works.

The LogInit function is now horrible, can't figure out why there needs to be a EEPROM read and write. but I have no working EEPROM, so I can't test a rewrite.

tned73 avatar Nov 03 '17 17:11 tned73

I think a better solution to this problem is to add a new command to the chameleon command line, e.g. "SETTING_STORAGE=OFF" that is set to ON automatically on every startup by default. It prevents the eeprom from being updated on setting change. This could be easily Integrated into any automated script. Other options would be "INTERACTIVE_MODE=ON" or SCRIPT_MODE=ON"

skuep avatar Nov 03 '17 17:11 skuep

That is a nicer solution. This patch only fixes some points with the existing Makefile parameter. The parameter implies that you can use eeprom, so if you don't, now there is no eeprom used.

De Command line option and this fix are not mutely exclusive, both can be implemented at the same time.

tned73 avatar Nov 03 '17 18:11 tned73