diff --git a/esp8266/Makefile b/esp8266/Makefile
index 7d3567e6dc5754a559f82e8d8cbbfc56d02960a9..27a35d7ddeff389822862bfa88005d7cf34d175f 100644
--- a/esp8266/Makefile
+++ b/esp8266/Makefile
@@ -63,6 +63,7 @@ SRC_C = \
 	modnetwork.c \
 	modutime.c \
 	moduos.c \
+	modmachine.c \
 	utils.c \
 	$(BUILD)/frozen.c \
 
diff --git a/esp8266/mpconfigport.h b/esp8266/mpconfigport.h
index cadff86fd374a352e43232d4edd7a2b5502cac7c..1f823c02e96a5984c764b576b15442f678b6348f 100644
--- a/esp8266/mpconfigport.h
+++ b/esp8266/mpconfigport.h
@@ -43,6 +43,7 @@
 #define MICROPY_PY_UHASHLIB         (1)
 #define MICROPY_PY_UHASHLIB_SHA1    (1)
 #define MICROPY_PY_UJSON            (1)
+#define MICROPY_PY_MACHINE          (1)
 #define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
 #define MICROPY_CPYTHON_COMPAT      (1)
 #define MICROPY_LONGINT_IMPL        (MICROPY_LONGINT_IMPL_MPZ)
@@ -80,6 +81,7 @@ extern const struct _mp_obj_module_t esp_module;
 extern const struct _mp_obj_module_t network_module;
 extern const struct _mp_obj_module_t utime_module;
 extern const struct _mp_obj_module_t uos_module;
+extern const struct _mp_obj_module_t mp_module_machine;
 
 #define MICROPY_PORT_BUILTIN_MODULES \
     { MP_OBJ_NEW_QSTR(MP_QSTR_pyb), (mp_obj_t)&pyb_module }, \
@@ -87,6 +89,7 @@ extern const struct _mp_obj_module_t uos_module;
     { MP_OBJ_NEW_QSTR(MP_QSTR_network), (mp_obj_t)&network_module }, \
     { MP_OBJ_NEW_QSTR(MP_QSTR_utime), (mp_obj_t)&utime_module }, \
     { MP_OBJ_NEW_QSTR(MP_QSTR_uos), (mp_obj_t)&uos_module }, \
+    { MP_OBJ_NEW_QSTR(MP_QSTR_machine), (mp_obj_t)&mp_module_machine }, \
 
 #define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
     { MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&utime_module }, \