summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-01-27 16:15:47 +1100
committerDamien George <damien.p.george@gmail.com>2019-01-27 16:15:47 +1100
commite7ab4752766100a022d8fab4b947675a440b11b6 (patch)
tree744d93730b51824bba9501d199b71a57a715f9ad
parentdeb67569ff66b2111cd18679a3bbdb35655cd25d (diff)
esp32: Don't put py/scheduler.o in iRAM, it's no longer needed.
ISR's no longer need to be in iRAM, and the ESP IDF provides an option to specify that they are in iRAM if an application needs lower latency when handling them. But we don't use this feature for user interrupts: both timer and gpio ISR routines are registered without the ESP_INTR_FLAG_IRAM option, and so the scheduling code no longer needs to be in iRAM.
-rw-r--r--ports/esp32/esp32.custom_common.ld1
-rw-r--r--ports/esp32/machine_pin.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/ports/esp32/esp32.custom_common.ld b/ports/esp32/esp32.custom_common.ld
index 9762c0d29..d28d5e26c 100644
--- a/ports/esp32/esp32.custom_common.ld
+++ b/ports/esp32/esp32.custom_common.ld
@@ -108,7 +108,6 @@ SECTIONS
*spi_flash/spi_flash_rom_patch.o(.literal .text .literal.* .text.*)
*libgcov.a:(.literal .text .literal.* .text.*)
INCLUDE esp32.spiram.rom-functions-iram.ld
- *py/scheduler.o*(.literal .text .literal.* .text.*)
_iram_text_end = ABSOLUTE(.);
_iram_end = ABSOLUTE(.);
} > iram0_0_seg
diff --git a/ports/esp32/machine_pin.c b/ports/esp32/machine_pin.c
index 1f4226474..a899fa62a 100644
--- a/ports/esp32/machine_pin.c
+++ b/ports/esp32/machine_pin.c
@@ -112,7 +112,7 @@ void machine_pins_deinit(void) {
}
}
-STATIC void IRAM_ATTR machine_pin_isr_handler(void *arg) {
+STATIC void machine_pin_isr_handler(void *arg) {
machine_pin_obj_t *self = arg;
mp_obj_t handler = MP_STATE_PORT(machine_pin_irq_handler)[self->id];
mp_sched_schedule(handler, MP_OBJ_FROM_PTR(self));