From 6f9c84d8020b36c214a21ed4ed795991c86b0144 Mon Sep 17 00:00:00 2001 From: Johny Mattsson Date: Thu, 26 May 2016 15:47:33 +1000 Subject: [PATCH] Shuffle all rodata back into IROM. With a working exception handler all of the RTOS-SDK bits seem to be happy too. So far. --- app/user/user_main.c | 2 ++ ld/nodemcu.ld | 7 +------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/user/user_main.c b/app/user/user_main.c index 1c53e4dd..0c37d2e9 100644 --- a/app/user/user_main.c +++ b/app/user/user_main.c @@ -45,6 +45,8 @@ void TEXT_SECTION_ATTR user_start_trampoline (void) rtctime_early_startup (); #endif + /* The first thing call_user_start() does is switch the interrupt vector + * base, which enables our 8/16bit load handler. */ call_user_start (); } diff --git a/ld/nodemcu.ld b/ld/nodemcu.ld index 69ac944d..7e832b36 100644 --- a/ld/nodemcu.ld +++ b/ld/nodemcu.ld @@ -95,7 +95,7 @@ SECTIONS *(.clientcert.flash) *(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text) *(.literal.* .text.*) - */.output/eagle*.a:*.o(.rodata*) /* only NodeMCU rodata, for now */ + *(.rodata*) *(.sdk.version) /* Link-time arrays containing the defs for the included modules */ @@ -119,11 +119,6 @@ SECTIONS .rodata : ALIGN(4) { _rodata_start = ABSOLUTE(.); - /* Some stuff in the RTOS libmain uses rodata while flash isn't mapped, - * so said rodata has to reside in RAM. For now we know libmain does this, - * as well as "something else". Hopefully we can narrow that down */ - *libmain.a:*.o(.rodata*) - */lib/lib*.a:*.o(.rodata*) /* rest of SDK rodata, for now */ *(.gnu.linkonce.r.*) __XT_EXCEPTION_TABLE__ = ABSOLUTE(.);