@@ -255,15 +255,12 @@ typedef long mp_off_t;
255255#define BOARD_I2C (defined(DEFAULT_I2C_BUS_SDA) && defined(DEFAULT_I2C_BUS_SCL))
256256#define BOARD_SPI (defined(DEFAULT_SPI_BUS_SCK) && defined(DEFAULT_SPI_BUS_MISO) && defined(DEFAULT_SPI_BUS_MOSI))
257257#define BOARD_UART (defined(DEFAULT_UART_BUS_RX) && defined(DEFAULT_UART_BUS_TX))
258-
259258// I2C and SPI are always allocated off the heap.
260-
261259#if BOARD_UART
262260#define BOARD_UART_ROOT_POINTER mp_obj_t shared_uart_bus;
263261#else
264262#define BOARD_UART_ROOT_POINTER
265263#endif
266-
267264#else
268265#define BOARD_UART_ROOT_POINTER
269266#endif
@@ -283,14 +280,6 @@ typedef long mp_off_t;
283280#define ERRNO_MODULE { MP_ROM_QSTR(MP_QSTR_errno), MP_ROM_PTR(&mp_module_uerrno) },
284281#else
285282#define ERRNO_MODULE
286- #
287- #endif
288-
289- #if CIRCUITPY_ESPIDF
290- extern const struct _mp_obj_module_t espidf_module ;
291- #define ESPIDF_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_espidf),(mp_obj_t)&espidf_module },
292- #else
293- #define ESPIDF_MODULE
294283#endif
295284
296285#if CIRCUITPY_GAMEPADSHIFT
@@ -331,45 +320,13 @@ extern const struct _mp_obj_module_t espidf_module;
331320extern const struct _mp_obj_module_t nvm_module ;
332321#endif
333322
334- #if CIRCUITPY_OS
335- extern const struct _mp_obj_module_t os_module ;
336- #define OS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_os), (mp_obj_t)&os_module },
337- #define OS_MODULE_ALT_NAME { MP_OBJ_NEW_QSTR(MP_QSTR__os), (mp_obj_t)&os_module },
338- #else
339- #define OS_MODULE
340- #define OS_MODULE_ALT_NAME
341- #endif
342-
343323#if CIRCUITPY_RE
344324#define MICROPY_PY_URE (1)
345325#define RE_MODULE { MP_ROM_QSTR(MP_QSTR_re), MP_ROM_PTR(&mp_module_ure) },
346326#else
347327#define RE_MODULE
348328#endif
349329
350- #if CIRCUITPY_RP2PIO
351- extern const struct _mp_obj_module_t rp2pio_module ;
352- #define RP2PIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rp2pio),(mp_obj_t)&rp2pio_module },
353- #else
354- #define RP2PIO_MODULE
355- #endif
356-
357- #if CIRCUITPY_SAMD
358- extern const struct _mp_obj_module_t samd_module ;
359- #define SAMD_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_samd),(mp_obj_t)&samd_module },
360- #else
361- #define SAMD_MODULE
362- #endif
363-
364- #if CIRCUITPY_TIME
365- extern const struct _mp_obj_module_t time_module ;
366- #define TIME_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&time_module },
367- #define TIME_MODULE_ALT_NAME { MP_OBJ_NEW_QSTR(MP_QSTR__time), (mp_obj_t)&time_module },
368- #else
369- #define TIME_MODULE
370- #define TIME_MODULE_ALT_NAME
371- #endif
372-
373330#if defined(CIRCUITPY_ULAB ) && CIRCUITPY_ULAB
374331// ulab requires reverse special methods
375332#if defined(MICROPY_PY_REVERSE_SPECIAL_METHODS ) && !MICROPY_PY_REVERSE_SPECIAL_METHODS
@@ -383,17 +340,15 @@ extern const struct _mp_obj_module_t time_module;
383340
384341// Define certain native modules with weak links so they can be replaced with Python
385342// implementations. This list may grow over time.
386- #define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
387- OS_MODULE \
388- TIME_MODULE \
343+
344+ #define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS
389345
390346// Native modules that are weak links can be accessed directly
391347// by prepending their name with an underscore. This list should correspond to
392348// MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS, assuming you want the native modules
393349// to be accessible when overriden.
394- #define MICROPY_PORT_BUILTIN_MODULE_ALT_NAMES \
395- OS_MODULE_ALT_NAME \
396- TIME_MODULE_ALT_NAME \
350+
351+ #define MICROPY_PORT_BUILTIN_MODULE_ALT_NAMES
397352
398353// This is an inclusive list that should correspond to the CIRCUITPY_XXX list above,
399354// including dependencies.
@@ -403,11 +358,8 @@ extern const struct _mp_obj_module_t time_module;
403358#define MICROPY_PORT_BUILTIN_MODULES_STRONG_LINKS \
404359 BINASCII_MODULE \
405360 ERRNO_MODULE \
406- ESPIDF_MODULE \
407361 JSON_MODULE \
408362 RE_MODULE \
409- RP2PIO_MODULE \
410- SAMD_MODULE \
411363
412364// The following modules are defined in their respective __init__.c file in the
413365// shared-bindings directory using MP_REGISTER_MODULE.
0 commit comments