Skip to content

Commit eb9a3ec

Browse files
author
Daniel Campora
committed
cc3200: Disable uheapq and uhashlib.
Those two are rarely used features and better to have the extra heap.
1 parent 6143f63 commit eb9a3ec

5 files changed

Lines changed: 9 additions & 15 deletions

File tree

cc3200/application.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ APP_MISC_SRC_C = $(addprefix misc/,\
8787
APP_MODS_SRC_C = $(addprefix mods/,\
8888
modmachine.c \
8989
modnetwork.c \
90-
moduhashlib.c \
9190
modubinascii.c \
9291
moduos.c \
9392
modusocket.c \

cc3200/mods/pybsleep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ void pyb_sleep_suspend_exit (void) {
472472
mp_irq_wake_all();
473473

474474
// we need to init the crypto hash engine again
475-
CRYPTOHASH_Init();
475+
//CRYPTOHASH_Init();
476476

477477
// trigger a sw interrupt
478478
MAP_IntPendSet(INT_PRCM);

cc3200/mpconfigport.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
#define MICROPY_PY_UZLIB (0)
9797
#define MICROPY_PY_UJSON (1)
9898
#define MICROPY_PY_URE (1)
99-
#define MICROPY_PY_UHEAPQ (1)
99+
#define MICROPY_PY_UHEAPQ (0)
100100
#define MICROPY_PY_UHASHLIB (0)
101101

102102
#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
@@ -115,13 +115,11 @@ extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;
115115
extern const struct _mp_obj_module_t machine_module;
116116
extern const struct _mp_obj_module_t mp_module_ure;
117117
extern const struct _mp_obj_module_t mp_module_ujson;
118-
extern const struct _mp_obj_module_t mp_module_uheapq;
119118
extern const struct _mp_obj_module_t mp_module_uos;
120119
extern const struct _mp_obj_module_t mp_module_utime;
121120
extern const struct _mp_obj_module_t mp_module_uselect;
122121
extern const struct _mp_obj_module_t mp_module_usocket;
123122
extern const struct _mp_obj_module_t mp_module_network;
124-
extern const struct _mp_obj_module_t mp_module_uhashlib;
125123
extern const struct _mp_obj_module_t mp_module_ubinascii;
126124
extern const struct _mp_obj_module_t mp_module_ussl;
127125

@@ -132,20 +130,17 @@ extern const struct _mp_obj_module_t mp_module_ussl;
132130
{ MP_OBJ_NEW_QSTR(MP_QSTR_uselect), (mp_obj_t)&mp_module_uselect }, \
133131
{ MP_OBJ_NEW_QSTR(MP_QSTR_usocket), (mp_obj_t)&mp_module_usocket }, \
134132
{ MP_OBJ_NEW_QSTR(MP_QSTR_network), (mp_obj_t)&mp_module_network }, \
135-
{ MP_OBJ_NEW_QSTR(MP_QSTR_uhashlib), (mp_obj_t)&mp_module_uhashlib }, \
136133
{ MP_OBJ_NEW_QSTR(MP_QSTR_ubinascii), (mp_obj_t)&mp_module_ubinascii }, \
137134
{ MP_OBJ_NEW_QSTR(MP_QSTR_ussl), (mp_obj_t)&mp_module_ussl }, \
138135

139136
#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
140137
{ MP_OBJ_NEW_QSTR(MP_QSTR_struct), (mp_obj_t)&mp_module_ustruct }, \
141138
{ MP_OBJ_NEW_QSTR(MP_QSTR_re), (mp_obj_t)&mp_module_ure }, \
142139
{ MP_OBJ_NEW_QSTR(MP_QSTR_json), (mp_obj_t)&mp_module_ujson }, \
143-
{ MP_OBJ_NEW_QSTR(MP_QSTR_heapq), (mp_obj_t)&mp_module_uheapq }, \
144140
{ MP_OBJ_NEW_QSTR(MP_QSTR_os), (mp_obj_t)&mp_module_uos }, \
145141
{ MP_OBJ_NEW_QSTR(MP_QSTR_time), (mp_obj_t)&mp_module_utime }, \
146142
{ MP_OBJ_NEW_QSTR(MP_QSTR_select), (mp_obj_t)&mp_module_uselect }, \
147143
{ MP_OBJ_NEW_QSTR(MP_QSTR_socket), (mp_obj_t)&mp_module_usocket }, \
148-
{ MP_OBJ_NEW_QSTR(MP_QSTR_hashlib), (mp_obj_t)&mp_module_uhashlib }, \
149144
{ MP_OBJ_NEW_QSTR(MP_QSTR_binascii), (mp_obj_t)&mp_module_ubinascii }, \
150145
{ MP_OBJ_NEW_QSTR(MP_QSTR_ssl), (mp_obj_t)&mp_module_ussl }, \
151146

cc3200/mptask.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ STATIC void mptask_pre_init (void) {
267267
// this one allocates memory for the socket semaphore
268268
modusocket_pre_init();
269269

270-
CRYPTOHASH_Init();
270+
//CRYPTOHASH_Init();
271271

272272
#ifdef DEBUG
273273
ASSERT (OSI_OK == osi_TaskCreate(TASK_Servers,

cc3200/qstrdefsport.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Q(binascii)
6868
Q(re)
6969
Q(json)
7070
Q(heapq)
71-
Q(hashlib)
71+
//Q(hashlib)
7272

7373
// for os module
7474
Q(os)
@@ -376,12 +376,12 @@ Q(POSITIVE)
376376
Q(NEGATIVE)
377377

378378
// for uhashlib module
379-
Q(uhashlib)
380-
Q(update)
381-
Q(digest)
379+
//Q(uhashlib)
380+
//Q(update)
381+
//Q(digest)
382382
//Q(md5)
383-
Q(sha1)
384-
Q(sha256)
383+
//Q(sha1)
384+
//Q(sha256)
385385

386386
// for ubinascii module
387387
Q(ubinascii)

0 commit comments

Comments
 (0)