Merge branch 'feature/Add_noinit_rtc_noinit_sections' into 'master'

esp32: Add .noinit and .rtc_noinit sections to the linker script

See merge request idf/esp-idf!1996
This commit is contained in:
Ivan Grokhotkov
2018-06-08 16:01:30 +08:00
4 changed files with 176 additions and 4 deletions

View File

@@ -47,4 +47,12 @@
// Forces read-only data into RTC slow memory. See "docs/deep-sleep-stub.rst"
#define RTC_RODATA_ATTR __attribute__((section(".rtc.rodata")))
// Forces data into noinit section to avoid initialization after restart.
#define __NOINIT_ATTR __attribute__((section(".noinit")))
// Forces data into RTC slow memory of .noinit section.
// Any variable marked with this attribute will keep its value
// after restart or during a deep sleep / wake cycle.
#define RTC_NOINIT_ATTR __attribute__((section(".rtc_noinit")))
#endif /* __ESP_ATTR_H__ */