From 8d0421c3cf25e3faae03c936f889a31fd02c3ce7 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 7 Feb 2020 12:11:05 +1100 Subject: [PATCH] esp8266: Put mp_keyboard_interrupt in IRAM. It was originally in IRAM due to the linker script specification, but since the function moved from lib/utils/interrupt_char.c to py/scheduler.c it needs to be put back in IRAM. --- ports/esp8266/boards/esp8266_common.ld | 2 +- ports/esp8266/mpconfigport.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/esp8266/boards/esp8266_common.ld b/ports/esp8266/boards/esp8266_common.ld index 09896d5229..5971994d70 100644 --- a/ports/esp8266/boards/esp8266_common.ld +++ b/ports/esp8266/boards/esp8266_common.ld @@ -140,7 +140,7 @@ SECTIONS *lib/utils/sys_stdio_mphal.o*(.literal*, .text*) *lib/utils/pyexec.o*(.literal*, .text*) *lib/utils/stdout_helpers.o*(.literal*, .text*) - *lib/utils/interrupt_char.o*(.literal.mp_hal_set_interrupt_char, .text.mp_hal_set_interrupt_char) + *lib/utils/interrupt_char.o*(.literal*, .text*) *drivers/bus/*.o(.literal* .text*) build-*/main.o(.literal* .text*) diff --git a/ports/esp8266/mpconfigport.h b/ports/esp8266/mpconfigport.h index 81544bb2a3..ba4b1d0a94 100644 --- a/ports/esp8266/mpconfigport.h +++ b/ports/esp8266/mpconfigport.h @@ -191,5 +191,6 @@ extern const struct _mp_obj_module_t mp_module_onewire; #define MICROPY_PY_SYS_PLATFORM "esp8266" #define MP_FASTCODE(n) __attribute__((section(".iram0.text." #n))) n +#define MICROPY_WRAP_MP_KEYBOARD_INTERRUPT(f) MP_FASTCODE(f) #define _assert(expr) ((expr) ? (void)0 : __assert_func(__FILE__, __LINE__, __func__, #expr))