Explorar el Código

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.
Johny Mattsson hace 8 años
padre
commit
f9c65b945c
Se han modificado 3 ficheros con 15 adiciones y 6 borrados
  1. 1 1
      app/.gitignore
  2. 6 3
      app/Makefile
  3. 8 2
      app/user/user_main.c

+ 1 - 1
app/.gitignore

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

+ 6 - 3
app/Makefile

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

+ 8 - 2
app/user/user_main.c

@@ -43,6 +43,7 @@ void system_soft_wdt_feed (void)
 extern void call_user_start (void);
 
 
+#if defined(__ESP8266__)
 /* 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
  * also goes for anything the trampoline itself calls.
@@ -56,9 +57,10 @@ void TEXT_SECTION_ATTR user_start_trampoline (void)
 #endif
 
   /* 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 ();
 }
+#endif
 
 // +================== New task interface ==================+
 static void start_lua(task_param_t param, task_prio_t prio) {
@@ -95,7 +97,8 @@ void nodemcu_init(void)
         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()) {
         NODE_ERR("Self adjust flash size.\n");
         // Fit hardware real flash size.
@@ -151,10 +154,13 @@ void user_init(void)
     rtctime_late_startup ();
 #endif
 
+#if !defined(__ESP32__)
+    // FIXME - need UART driver for ESP32
     UartBautRate br = BIT_RATE_DEFAULT;
 
     input_sig = task_get_id(handle_input);
     uart_init (br, br, input_sig);
+#endif
 
 #ifndef NODE_DEBUG
     system_set_os_print(0);