mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
BREAKING - Use IRAM_ATTR in place of ICACHE_RAM_ATTR (#7921)
Update the core to use the define that the ESP32 uses, IRAM_ATTR, for placing code in DRAM.
This commit is contained in:
committed by
GitHub
parent
6743a65987
commit
656a33e6f8
@ -86,15 +86,15 @@ typedef enum {
|
||||
#ifdef ICACHE_FLASH
|
||||
#define __ICACHE_STRINGIZE_NX(A) #A
|
||||
#define __ICACHE_STRINGIZE(A) __ICACHE_STRINGIZE_NX(A)
|
||||
#define ICACHE_FLASH_ATTR __attribute__((section("\".irom0.text." __FILE__ "." __ICACHE_STRINGIZE(__LINE__) "." __ICACHE_STRINGIZE(__COUNTER__) "\"")))
|
||||
#define ICACHE_RAM_ATTR __attribute__((section("\".iram.text." __FILE__ "." __ICACHE_STRINGIZE(__LINE__) "." __ICACHE_STRINGIZE(__COUNTER__) "\"")))
|
||||
#define ICACHE_FLASH_ATTR __attribute__((section("\".irom0.text." __FILE__ "." __ICACHE_STRINGIZE(__LINE__) "." __ICACHE_STRINGIZE(__COUNTER__) "\"")))
|
||||
#define IRAM_ATTR __attribute__((section("\".iram.text." __FILE__ "." __ICACHE_STRINGIZE(__LINE__) "." __ICACHE_STRINGIZE(__COUNTER__) "\"")))
|
||||
#else
|
||||
#define ICACHE_FLASH_ATTR
|
||||
#define ICACHE_RAM_ATTR
|
||||
#define IRAM_ATTR
|
||||
#endif /* ICACHE_FLASH */
|
||||
|
||||
// counterpart https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp8266-compat.h
|
||||
#define IRAM_ATTR ICACHE_RAM_ATTR
|
||||
#define ICACHE_RAM_ATTR IRAM_ATTR __attribute__((deprecated("Use IRAM_ATTR in place of ICACHE_RAM_ATTR to move functions into IRAM")))
|
||||
|
||||
#define STORE_ATTR __attribute__((aligned(4)))
|
||||
|
||||
|
@ -27,7 +27,7 @@ def get_segment_hints(iram):
|
||||
hints = {}
|
||||
hints['ICACHE'] = ' - flash instruction cache'
|
||||
hints['IROM'] = ' - code in flash (default or ICACHE_FLASH_ATTR)'
|
||||
hints['IRAM'] = ' / ' + str(iram) + ' - code in IRAM (ICACHE_RAM_ATTR, ISRs...)'
|
||||
hints['IRAM'] = ' / ' + str(iram) + ' - code in IRAM (IRAM_ATTR, ISRs...)'
|
||||
hints['DATA'] = ') - initialized variables (global, static) in RAM/HEAP'
|
||||
hints['RODATA'] = ') / 81920 - constants (global, static) in RAM/HEAP'
|
||||
hints['BSS'] = ') - zeroed variables (global, static) in RAM/HEAP'
|
||||
|
Reference in New Issue
Block a user