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.
This commit is contained in:
Damien George 2018-06-28 12:55:54 +10:00
parent d8dc918deb
commit d800ed1877
1 changed files with 6 additions and 1 deletions

View File

@ -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*)