Skip to content

Commit 78972cc

Browse files
committed
ports/atmel-samd: enable json module on M4 boards with lots of flash
1 parent 0ea31ec commit 78972cc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ports/atmel-samd/mpconfigport.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,14 @@ extern const struct _mp_obj_module_t wiznet_module;
286286
#define WIZNET_MODULE
287287
#endif
288288

289+
// (u)json depends, perhaps erroneously, on MICROPY_PY_IO
290+
#if MICROPY_PY_IO
291+
#define JSON_MODULE { MP_ROM_QSTR(MP_QSTR_json), MP_ROM_PTR(&mp_module_ujson) },
292+
#define MICROPY_PY_UJSON (1)
293+
#else
294+
#define JSON_MODULE
295+
#endif
296+
289297

290298
#ifndef EXTRA_BUILTIN_MODULES
291299
#define EXTRA_BUILTIN_MODULES \
@@ -297,6 +305,7 @@ extern const struct _mp_obj_module_t wiznet_module;
297305
NETWORK_MODULE \
298306
SOCKET_MODULE \
299307
WIZNET_MODULE \
308+
JSON_MODULE \
300309
{ MP_OBJ_NEW_QSTR(MP_QSTR_rotaryio), (mp_obj_t)&rotaryio_module }, \
301310
{ MP_OBJ_NEW_QSTR(MP_QSTR_gamepad),(mp_obj_t)&gamepad_module }
302311
#endif

0 commit comments

Comments
 (0)