Only include uheap in debug builds.

This commit is contained in:
Scott Shawcroft 2016-11-29 10:46:47 -08:00
parent d2aa05a9fe
commit 888efa54e2
2 changed files with 8 additions and 2 deletions

View File

@ -128,8 +128,10 @@ extern const struct _mp_obj_module_t uheap_module;
{ MP_OBJ_NEW_QSTR(MP_QSTR_board), (mp_obj_t)&board_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_uos), (mp_obj_t)&uos_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&time_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_neopixel_write),(mp_obj_t)&neopixel_write_module }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_uheap),(mp_obj_t)&uheap_module } \
{ MP_OBJ_NEW_QSTR(MP_QSTR_neopixel_write),(mp_obj_t)&neopixel_write_module }
#define MICROPY_PORT_BUILTIN_DEBUG_MODULES \
{ MP_OBJ_NEW_QSTR(MP_QSTR_uheap),(mp_obj_t)&uheap_module }
// board specific definitions
#include "mpconfigboard.h"

View File

@ -219,6 +219,10 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
// extra builtin modules as defined by a port
MICROPY_PORT_BUILTIN_MODULES
#if defined(DEBUG) && defined(MICROPY_PORT_BUILTIN_DEBUG_MODULES)
, MICROPY_PORT_BUILTIN_DEBUG_MODULES
#endif
};
STATIC MP_DEFINE_CONST_MAP(mp_builtin_module_map, mp_builtin_module_table);