]> granicus.if.org Git - esp-idf/commitdiff
Merge branch 'feature/deep_sleep_wake_stub' into 'master'
authorWu Jian Gang <wujiangang@espressif.com>
Thu, 29 Sep 2016 10:07:16 +0000 (18:07 +0800)
committerWu Jian Gang <wujiangang@espressif.com>
Thu, 29 Sep 2016 10:07:16 +0000 (18:07 +0800)
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.

See merge request !78

1  2 
components/freertos/Kconfig

index af7142bb1f0a29e929e1bcaec3e78763a439f50a,e350e347f3f946f75e1c0045af85251f99663597..7e0245e92d8cb76096dc501d0faa1755901f2e08
@@@ -38,47 -38,39 +38,47 @@@ config FREERTOS_CORETIMER_
  endchoice
  
  config FREERTOS_HZ
-       int "Tick rate (Hz)"
-       range 1 10000
-       default 100
-       help
-               Select the tick rate at which FreeRTOS does pre-emptive context switching.
+     int "Tick rate (Hz)"
+     range 1 10000
+     default 100
+     help
+         Select the tick rate at which FreeRTOS does pre-emptive context switching.
  
 +config FREERTOS_ASSERT_ON_UNTESTED_FUNCTION
 +      bool "Halt when an SMP-untested function is called"
 +      default y
 +      help
 +              Some functions in FreeRTOS have not been thoroughly tested yet when moving to
 +              the SMP implementation of FreeRTOS. When this option is enabled, these fuctions
 +              will throw an assert().
 +
  choice FREERTOS_CHECK_STACKOVERFLOW
-       prompt "Check for stack overflow"
-       default FREERTOS_CHECK_STACKOVERFLOW_QUICK
-       help
-               FreeRTOS can check for stack overflows in threads and trigger an user function
-               called vApplicationStackOverflowHook when this happens.
+     prompt "Check for stack overflow"
+     default FREERTOS_CHECK_STACKOVERFLOW_QUICK
+     help
+         FreeRTOS can check for stack overflows in threads and trigger an user function
+         called vApplicationStackOverflowHook when this happens.
  
  config FREERTOS_CHECK_STACKOVERFLOW_NONE
-       bool "No checking"
-       help
-               Do not check for stack overflows (configCHECK_FOR_STACK_OVERFLOW=0)
+     bool "No checking"
+     help
+         Do not check for stack overflows (configCHECK_FOR_STACK_OVERFLOW=0)
  
  config FREERTOS_CHECK_STACKOVERFLOW_PTRVAL
-       bool "Check by stack pointer value"
-       help
-               Check for stack overflows on each context switch by checking if
-               the stack pointer is in a valid range. Quick but does not detect
-               stack overflows that happened between context switches
-               (configCHECK_FOR_STACK_OVERFLOW=1)
+     bool "Check by stack pointer value"
+     help
+         Check for stack overflows on each context switch by checking if
+         the stack pointer is in a valid range. Quick but does not detect
+         stack overflows that happened between context switches
+         (configCHECK_FOR_STACK_OVERFLOW=1)
  
  config FREERTOS_CHECK_STACKOVERFLOW_CANARY
-       bool "Check using canary bytes"
-       help
-               Places some magic bytes at the end of the stack area and on each 
-               context switch, check if these bytes are still intact. More thorough
-               than just checking the pointer, but also slightly slower.
-               (configCHECK_FOR_STACK_OVERFLOW=2)
+     bool "Check using canary bytes"
+     help
+         Places some magic bytes at the end of the stack area and on each 
+         context switch, check if these bytes are still intact. More thorough
+         than just checking the pointer, but also slightly slower.
+         (configCHECK_FOR_STACK_OVERFLOW=2)
  endchoice
  
  config FREERTOS_THREAD_LOCAL_STORAGE_POINTERS