From 48d81c690011126ebb70a521f28ab7588fa7c9be Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Thu, 15 Dec 2016 15:52:47 +1100
Subject: [PATCH] esp8266: Use core-provided keyboard exception object.

---
 esp8266/main.c         | 1 -
 esp8266/mpconfigport.h | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/esp8266/main.c b/esp8266/main.c
index 6814248aa..da37706fc 100644
--- a/esp8266/main.c
+++ b/esp8266/main.c
@@ -52,7 +52,6 @@ STATIC void mp_reset(void) {
     mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib));
     mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_));
     mp_obj_list_init(mp_sys_argv, 0);
-    MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
     MP_STATE_PORT(term_obj) = MP_OBJ_NULL;
     MP_STATE_PORT(dupterm_arr_obj) = MP_OBJ_NULL;
     #if MICROPY_EMIT_XTENSA || MICROPY_EMIT_INLINE_XTENSA
diff --git a/esp8266/mpconfigport.h b/esp8266/mpconfigport.h
index d15a7cdd4..9c9682484 100644
--- a/esp8266/mpconfigport.h
+++ b/esp8266/mpconfigport.h
@@ -19,6 +19,7 @@
 #define MICROPY_ENABLE_GC           (1)
 #define MICROPY_STACK_CHECK         (1)
 #define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
+#define MICROPY_KBD_EXCEPTION       (1)
 #define MICROPY_REPL_EVENT_DRIVEN   (0)
 #define MICROPY_REPL_AUTO_INDENT    (1)
 #define MICROPY_HELPER_REPL         (1)
@@ -174,7 +175,6 @@ extern const struct _mp_obj_module_t onewire_module;
 #define MICROPY_PORT_ROOT_POINTERS \
     const char *readline_hist[8]; \
     vstr_t *repl_line; \
-    mp_obj_t mp_kbd_exception; \
     mp_obj_t pin_irq_handler[16]; \
 
 // We need to provide a declaration/definition of alloca()
-- 
GitLab