Page 1 of 1

ESP32 fixed variables in ROM

Posted: Thu Oct 28, 2021 9:37 am
by pablo1610
Hi,

I would like to allocate some variables in the ROM memory address of the Espressif, so I can acess to them, change it's value and keep its value constant between each turn off-on process.

I know I can do it with an EEPROM memory, but I would prefer not using this peripheral.

How do I allocate those variables?<br/>

I'm coding in C and using ESP-IDF Eclipse and CMAKE to build the project.<br/>

Thanks,

Pablo

Re: ESP32 fixed variables in ROM

Posted: Fri Oct 29, 2021 4:30 am
by ESP_Dazz
The ROM in ESP chips is Mask ROM not EEPROM. So it is literally Read Only Memory.

Re: ESP32 fixed variables in ROM

Posted: Fri Oct 29, 2021 4:45 am
by ESP_Sprite
As an alternative, nvs probably approximates what you want (although you still need to save your values manually)