Functions implemented in ROM

rith87
Posts: 3
Joined: Thu Aug 17, 2023 12:43 am

Functions implemented in ROM

Postby rith87 » Thu Aug 17, 2023 12:51 am

In the deep sleep wake stub example, we see:
* Wake stub code must be carefully written, there are some rules for wake stub:
* 1) The wake stub code can only access data loaded in RTC memory.
* 2) The wake stub code can only call functions implemented in ROM or loaded into RTC Fast Memory.
* 3) RTC memory must include any read-only data (.rodata) used by the wake stub.
For (2), we can check for the `RTC_IRAM_ATTR` for functions in RTC memory. But how can a developer tell if a function is implemented in ROM? Is it just the functions in `esp_rom_sys.h`? Or any function with an `esp_rom_*` prefix?

MicroController
Posts: 1708
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Functions implemented in ROM

Postby MicroController » Thu Aug 17, 2023 8:14 am

AFAICT, you should be able to call any function provided by the "esp_rom" component.

Who is online

Users browsing this forum: snutw_ and 82 guests