esp32: Bootloader wake deep sleep stub

App can contain a stub program resident in RTC fast memory. Bootloader
will load the stub on initial boot. If the device wakes from deep sleep,
the stub is run immediately (before any other data is loaded, etc.)

To implement a custom wake stub, implement a function in your program:

```
void RTC_IRAM_ATTR esp_wake_deep_sleep(void)
{
  esp_default_wake_deep_sleep();
  // other wake logic
}
```

... and it will replace the default implementation.
This commit is contained in:
Angus Gratton
2016-09-12 17:23:15 +10:00
committed by Wu Jian Gang
parent b77bf9bc90
commit 7c494055e3
12 changed files with 264 additions and 34 deletions

View File

@@ -42,6 +42,7 @@
#include "esp_spi_flash.h"
#include "esp_ipc.h"
#include "esp_log.h"
#include "esp_deepsleep.h"
void start_cpu0(void) __attribute__((weak, alias("start_cpu0_default")));
void start_cpu0_default(void) IRAM_ATTR;