summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-02-07 12:11:05 +1100
committerDamien George <damien.p.george@gmail.com>2020-02-07 16:08:31 +1100
commit8d0421c3cf25e3faae03c936f889a31fd02c3ce7 (patch)
treef9fc2acf150258b441c6e90c83116c77cf5d6988
parent8fb5c8fdd506518ebdcca0b0628fbfb5c77c38a2 (diff)
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.
-rw-r--r--ports/esp8266/boards/esp8266_common.ld2
-rw-r--r--ports/esp8266/mpconfigport.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/ports/esp8266/boards/esp8266_common.ld b/ports/esp8266/boards/esp8266_common.ld
index 09896d522..5971994d7 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 81544bb2a..ba4b1d0a9 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))