ESP32 fixed variables in ROM

pablo1610
Posts: 7
Joined: Thu Oct 28, 2021 9:10 am

ESP32 fixed variables in ROM

Postby pablo1610 » Thu Oct 28, 2021 9:37 am

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
Last edited by pablo1610 on Fri Oct 29, 2021 6:48 am, edited 1 time in total.

ESP_Dazz
Posts: 308
Joined: Fri Jun 02, 2017 6:50 am

Re: ESP32 fixed variables in ROM

Postby ESP_Dazz » Fri Oct 29, 2021 4:30 am

The ROM in ESP chips is Mask ROM not EEPROM. So it is literally Read Only Memory.

ESP_Sprite
Posts: 9720
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 fixed variables in ROM

Postby ESP_Sprite » Fri Oct 29, 2021 4:45 am

As an alternative, nvs probably approximates what you want (although you still need to save your values manually)

Who is online

Users browsing this forum: No registered users and 26 guests