diff options
author | Damien George <damien.p.george@gmail.com> | 2018-06-28 12:55:54 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-06-28 12:55:54 +1000 |
commit | d800ed187756c734458d269b1bf0dbfe554ad4f1 (patch) | |
tree | 6761d8a29d3963ffff47a71c39e2c396d704edb8 | |
parent | d8dc918deb8d4b13b8919706f9f208542c9ef2e6 (diff) |
esp8266/esp8266_common.ld: Put mp_keyboard_interrupt in iRAM.
This function may be called from a UART IRQ, which may interrupt the system
when it is erasing/reading/writing flash. In such a case all code
executing from the IRQ must be in iRAM (because the SPI flash is busy), so
put mp_keyboard_interrupt in iRAM so ctrl-C can be caught during flash
access.
This patch also takes get_fattime out of iRAM and puts it in iROM to make
space for mp_keyboard_interrupt. There's no real need to have get_fattime
in iRAM because it calls other functions in iROM.
Fixes issue #3897.
-rw-r--r-- | ports/esp8266/esp8266_common.ld | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ports/esp8266/esp8266_common.ld b/ports/esp8266/esp8266_common.ld index 6b7eba56a..addceb4cc 100644 --- a/ports/esp8266/esp8266_common.ld +++ b/ports/esp8266/esp8266_common.ld @@ -134,10 +134,15 @@ SECTIONS *lib/mp-readline/*.o(.literal*, .text*) *lib/netutils/*.o*(.literal*, .text*) *lib/timeutils/*.o*(.literal*, .text*) - *lib/utils/*.o*(.literal*, .text*) + *lib/utils/printf.o*(.literal*, .text*) + *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) *drivers/bus/*.o(.literal* .text*) build/main.o(.literal* .text*) + *fatfs_port.o(.literal* .text*) *gccollect.o(.literal* .text*) *gchelper.o(.literal* .text*) *help.o(.literal* .text*) |