From 53302f16165dbbbfa665f1023720dfe4705d7fdc Mon Sep 17 00:00:00 2001
From: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Date: Sun, 27 Mar 2016 14:33:17 +0300
Subject: [PATCH] esp8266: Set up UART handling task soon into init process.

Otherwise, events may be posted to non-initialized task, which leads to
segfaults.
---
 esp8266/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/esp8266/main.c b/esp8266/main.c
index 2046d12d6..986be3a61 100644
--- a/esp8266/main.c
+++ b/esp8266/main.c
@@ -62,10 +62,10 @@ void soft_reset(void) {
 }
 
 void init_done(void) {
+    uart_task_init();
     mp_reset();
     mp_hal_stdout_tx_str("\r\n");
     pyexec_event_repl_init();
-    uart_task_init();
 }
 
 void user_init(void) {
-- 
GitLab