Functions implemented in ROM
Posted: Thu Aug 17, 2023 12:51 am
In the deep sleep wake stub example, we see:
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?* 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.