Go Down

Topic: EEPROM (Read 889 times) previous topic - next topic

hsalame

I have arduino mega and I want to check what are the free EEPROM slots to use them in upgrade for marlin firmware.
Could anyone help me?
Regards,,

pert

That doesn't make sense. The authors of Marlin will have made sure their EEPROM addresses don't conflict with each other so if you're using stock Marlin firmware you don't need to even think about EEPROM addresses.

If you are making your own modifications to the Marlin code to add code that writes to EEPROM then you definitely will need to be sure to find unused sections of EEPROM.

hsalame

That is what I want.
I want to know to unused sections in the EEPROM.

PaulS

Quote
I want to know to unused sections in the EEPROM.
An address that has never been written to will contain the value 255.

The presence of the value 255 does NOT mean that the address is unused, though.

You MUST look through the code to see where it expects to write data.
The art of getting good answers lies in asking good questions.

hsalame

Can I write a code that gives me the empty sections ?
Because marlin firmware is too complex.

MorganS

No. You must read the Marlin code. I expect that all of the EEPROM addresses are organized into one place.
"The problem is in the code you didn't post."

pert

With a quick look at the Marlin repository I notice two things:

I believe this setting determines whether EEPROM is used at all:
https://github.com/MarlinFirmware/Marlin/blob/1.1.x/Marlin/Configuration.h#L1116
Code: [Select]
//#define EEPROM_SETTINGS // Enable for M500 and M501 commands

I believe this indicates that the first 100 bytes of EEPROM are not used by Marlin:
https://github.com/MarlinFirmware/Marlin/blob/1.1.x/Marlin/configuration_store.cpp#L42
Code: [Select]
#define EEPROM_OFFSET 100

hsalame

Thanks for your help.

Go Up