Hi,
what does the internal ROM of the ESP32 chip actually contain?
A ROM size of 448 kBytes is really huge.
Usually, XiP (eXecution in Place) flashless microcontrollers have much smaller internal ROM sizes.
Thanks,
Enrico Migliore
ESP32 - Content of internal ROM
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32 - Content of internal ROM
Mostly the lower-layer parts of the BT stack (size-wise these occupy most of the ROM, iirc), parts of Newlib, some control code for the WiFi PHY layer, the bootloader to start code from external ROM and some bits of code to form a rudimentary scheduler. One of the reasons all this is in ROM is so in theory the ESP32 can work without an external SPI flash chip, by getting a RAM-only image uploaded over another port (serial, SDIO). As far as I am aware, this hasn't been used publically yet, however. Some other general-purpose routines (newlib, libtjpegd, miniz) are also included as running these from ROM doesn't take up any RAM and runs quicker than loading them from flash.
Re: ESP32 - Content of internal ROM
Thank you for the explanation.
Re: ESP32 - Content of internal ROM
It would be nice to have a list of all functions implemented in ROM with description how can be used. I know that they are listed in .ld files and some of them in header files.
Some of them are also reimplemented in ESP-IDF as they do not work due to SPIRAM / DPORT / any other bug.
Some of them are also reimplemented in ESP-IDF as they do not work due to SPIRAM / DPORT / any other bug.
Re: ESP32 - Content of internal ROM
Almost everything which is directly usable from an ESP-IDF app has a declaration in here:
https://github.com/espressif/esp-idf/tr ... nclude/rom
(Apart from the newlib libc, whose headers are in the newlib component.)
Although, a lot of what's declared there is not particularly usable from an ESP-IDF app either - a lot of the ROM functions don't have any way to coordinate access to hardware, so they'll clobber hardware configuration which is done by the app. They're mostly intended to be used from the bootloader or from much simpler RAM-only test or other programs running on the ESP32.
(Usually these functions have a note in the header discouraging their use in ESP-IDF apps.)
https://github.com/espressif/esp-idf/tr ... nclude/rom
(Apart from the newlib libc, whose headers are in the newlib component.)
Although, a lot of what's declared there is not particularly usable from an ESP-IDF app either - a lot of the ROM functions don't have any way to coordinate access to hardware, so they'll clobber hardware configuration which is done by the app. They're mostly intended to be used from the bootloader or from much simpler RAM-only test or other programs running on the ESP32.
(Usually these functions have a note in the header discouraging their use in ESP-IDF apps.)
Who is online
Users browsing this forum: Google [Bot] and 115 guests