ESP32 - Content of internal ROM

wwwenrico
Posts: 22
Joined: Thu Apr 26, 2018 9:29 am
Location: Italy

ESP32 - Content of internal ROM

Postby wwwenrico » Thu May 03, 2018 4:24 am

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

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

Re: ESP32 - Content of internal ROM

Postby ESP_Sprite » Thu May 03, 2018 7:04 am

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.

wwwenrico
Posts: 22
Joined: Thu Apr 26, 2018 9:29 am
Location: Italy

Re: ESP32 - Content of internal ROM

Postby wwwenrico » Thu May 03, 2018 1:25 pm

Thank you for the explanation.

michprev
Posts: 92
Joined: Fri Aug 04, 2017 8:57 pm

Re: ESP32 - Content of internal ROM

Postby michprev » Thu May 03, 2018 3:12 pm

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.

ESP_Angus
Posts: 2201
Joined: Sun May 08, 2016 4:11 am

Re: ESP32 - Content of internal ROM

Postby ESP_Angus » Fri May 04, 2018 3:45 am

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.)

Who is online

Users browsing this forum: Bing [Bot] and 16 guests