Skip to content

Commit bb55431

Browse files
Links2004igrr
authored andcommitted
add new macro for force function to ram
move uart_interrupt_handler in ram
1 parent 6a37b44 commit bb55431

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

hardware/esp8266com/esp8266/cores/esp8266/HardwareSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ UARTnr_t uart_get_debug();
101101
// ####################################################################################################
102102
// ####################################################################################################
103103

104-
void uart_interrupt_handler(uart_t* uart) {
104+
void ICACHE_RAM_ATTR uart_interrupt_handler(uart_t* uart) {
105105

106106
// -------------- UART 0 --------------
107107
uint32_t status = READ_PERI_REG(UART_INT_ST(0));

hardware/tools/esp8266/sdk/include/c_types.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ typedef enum {
6666
#define SHMEM_ATTR
6767

6868
#ifdef ICACHE_FLASH
69-
#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
70-
#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text")))
69+
#define ICACHE_FLASH_ATTR __attribute__((section(".irom0.text")))
70+
#define ICACHE_RAM_ATTR __attribute__((section(".text")))
71+
#define ICACHE_RODATA_ATTR __attribute__((section(".irom.text")))
7172
#else
7273
#define ICACHE_FLASH_ATTR
74+
#define ICACHE_RAM_ATTR
7375
#define ICACHE_RODATA_ATTR
7476
#endif /* ICACHE_FLASH */
7577

0 commit comments

Comments
 (0)