esp32: IRAM_DATA_ATTR and IRAM_BSS_ATTR introduced

Using these attributes, .data and .bss can be placed in IRAM

Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
This commit is contained in:
Sachin Parekh
2020-04-16 16:02:07 +05:30
parent f245a518be
commit 1e6c25992e
4 changed files with 55 additions and 3 deletions
+12
View File
@@ -28,6 +28,18 @@
// Forces data into DRAM instead of flash
#define DRAM_ATTR _SECTION_ATTR_IMPL(".dram1", __COUNTER__)
#ifdef CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY
// Forces data into IRAM instead of DRAM
#define IRAM_DATA_ATTR __attribute__((section(".iram.data")))
// Forces bss into IRAM instead of DRAM
#define IRAM_BSS_ATTR __attribute__((section(".iram.bss")))
#else
#define IRAM_DATA_ATTR
#define IRAM_BSS_ATTR
#endif
// Forces data to be 4 bytes aligned
#define WORD_ALIGNED_ATTR __attribute__((aligned(4)))