Disabled -Wl,--gc-sections for SDK libs.

Running without interrupt vectors not considered all that useful...

Disabled flash-size-byte-setting and SPIFFS formatting on ESP32, for now
at least, as both of these appeared to corrupt the flash and prevent
subsequent boots.

Disabled UART init on ESP32 until the driver gets updated.

This now gets us to a banner on ESP32, but not yet a prompt.
This commit is contained in:
Johny Mattsson 2016-06-22 18:58:25 +10:00
parent fd9fa71541
commit f9c65b945c
3 changed files with 15 additions and 6 deletions

2
app/.gitignore vendored
View File

@ -1,3 +1,3 @@
*.output* *.output*
mapfile mapfile*
!.gitignore !.gitignore

View File

@ -106,7 +106,7 @@ USED_SDK_LIBS= \
LINKFLAGS_eagle.app.v6 = \ LINKFLAGS_eagle.app.v6 = \
-Wl,--gc-sections \ -Wl,--gc-sections \
-Wl,-Map=mapfile \ -Wl,-Map=mapfile.$(TARGET) \
-nostdlib \ -nostdlib \
-T$(LD_FILE) \ -T$(LD_FILE) \
-Wl,@$(LDDIR)/defsym.rom \ -Wl,@$(LDDIR)/defsym.rom \
@ -116,10 +116,13 @@ LINKFLAGS_eagle.app.v6 = \
$(TARGET_LDFLAGS) \ $(TARGET_LDFLAGS) \
$(addprefix -u , $(SELECTED_MODULE_SYMS)) \ $(addprefix -u , $(SELECTED_MODULE_SYMS)) \
-Wl,--start-group \ -Wl,--start-group \
-lhal \
$(addprefix -l,$(USED_SDK_LIBS)) \
$(DEP_LIBS_eagle.app.v6) \ $(DEP_LIBS_eagle.app.v6) \
-Wl,--end-group \ -Wl,--end-group \
-Wl,--no-gc-sections \
-Wl,--start-group \
$(addprefix -l,$(USED_SDK_LIBS)) \
-lhal \
-Wl,--end-group \
DEPENDS_eagle.app.v6 = \ DEPENDS_eagle.app.v6 = \
$(LD_FILE) \ $(LD_FILE) \

View File

@ -43,6 +43,7 @@ void system_soft_wdt_feed (void)
extern void call_user_start (void); extern void call_user_start (void);
#if defined(__ESP8266__)
/* Note: the trampoline *must* be explicitly put into the .text segment, since /* Note: the trampoline *must* be explicitly put into the .text segment, since
* by the time it is invoked the irom has not yet been mapped. This naturally * by the time it is invoked the irom has not yet been mapped. This naturally
* also goes for anything the trampoline itself calls. * also goes for anything the trampoline itself calls.
@ -56,9 +57,10 @@ void TEXT_SECTION_ATTR user_start_trampoline (void)
#endif #endif
/* The first thing call_user_start() does is switch the interrupt vector /* The first thing call_user_start() does is switch the interrupt vector
* base, which enables our 8/16bit load handler. */ * base, which enables our 8/16bit load handler on the ESP8266. */
call_user_start (); call_user_start ();
} }
#endif
// +================== New task interface ==================+ // +================== New task interface ==================+
static void start_lua(task_param_t param, task_prio_t prio) { static void start_lua(task_param_t param, task_prio_t prio) {
@ -95,7 +97,8 @@ void nodemcu_init(void)
return; return;
} }
#if defined(FLASH_SAFE_API) // FIXME: this breaks horribly on the ESP32 at the moment; possibly all flash writes?
#if defined(FLASH_SAFE_API) && defined(__ESP8266__)
if( flash_safe_get_size_byte() != flash_rom_get_size_byte()) { if( flash_safe_get_size_byte() != flash_rom_get_size_byte()) {
NODE_ERR("Self adjust flash size.\n"); NODE_ERR("Self adjust flash size.\n");
// Fit hardware real flash size. // Fit hardware real flash size.
@ -151,10 +154,13 @@ void user_init(void)
rtctime_late_startup (); rtctime_late_startup ();
#endif #endif
#if !defined(__ESP32__)
// FIXME - need UART driver for ESP32
UartBautRate br = BIT_RATE_DEFAULT; UartBautRate br = BIT_RATE_DEFAULT;
input_sig = task_get_id(handle_input); input_sig = task_get_id(handle_input);
uart_init (br, br, input_sig); uart_init (br, br, input_sig);
#endif
#ifndef NODE_DEBUG #ifndef NODE_DEBUG
system_set_os_print(0); system_set_os_print(0);