diff --git a/ports/mimxrt/modmimxrt.c b/ports/mimxrt/modmimxrt.c index 041a72f7f7..0091c36ffb 100644 --- a/ports/mimxrt/modmimxrt.c +++ b/ports/mimxrt/modmimxrt.c @@ -41,3 +41,5 @@ const mp_obj_module_t mp_module_mimxrt = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&mimxrt_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_mimxrt, mp_module_mimxrt, 1); diff --git a/ports/mimxrt/modutime.c b/ports/mimxrt/modutime.c index 822e2771d2..f24ce43c0f 100644 --- a/ports/mimxrt/modutime.c +++ b/ports/mimxrt/modutime.c @@ -134,3 +134,5 @@ const mp_obj_module_t mp_module_utime = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&time_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_utime, 1); diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h index 1569268cd9..05de0306b4 100644 --- a/ports/mimxrt/mpconfigport.h +++ b/ports/mimxrt/mpconfigport.h @@ -228,9 +228,6 @@ static inline void restore_irq_pri(uint32_t basepri) { #define MICROPY_PORT_BUILTINS \ { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) }, -extern const struct _mp_obj_module_t mp_module_mimxrt; -extern const struct _mp_obj_module_t mp_module_utime; - #if defined(MICROPY_HW_ETH_MDC) extern const struct _mp_obj_type_t network_lan_type; #define MICROPY_HW_NIC_ETH { MP_ROM_QSTR(MP_QSTR_LAN), MP_ROM_PTR(&network_lan_type) }, @@ -238,10 +235,6 @@ extern const struct _mp_obj_type_t network_lan_type; #define MICROPY_HW_NIC_ETH #endif -#define MICROPY_PORT_BUILTIN_MODULES \ - { MP_ROM_QSTR(MP_QSTR_mimxrt), (mp_obj_t)&mp_module_mimxrt }, \ - { MP_ROM_QSTR(MP_QSTR_utime), MP_ROM_PTR(&mp_module_utime) }, \ - #ifndef MICROPY_BOARD_NETWORK_INTERFACES #define MICROPY_BOARD_NETWORK_INTERFACES #endif