File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed
Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 281281 } while (0);
282282#endif
283283
284+ /*****************************************************************************/
285+ /* Modules define in your project
286+ You must provide 'moddefs.user.extmods.h'
287+ and 'qstrdefs.user.extmods.h'
288+ */
289+
290+ #ifdef MICROPYTHON_USING_USEREXTMODS
291+ #define MICROPY_USER_EXTMODS (1)
292+ #include <moddefs.user.extmods.h>
293+ #else
294+ #define MICROPY_USER_EXTMODS (0)
295+ #endif
296+ #ifndef MICROPY_USER_MODULES
297+ #define MICROPY_USER_MODULES
298+ #endif
299+
284300#if defined(__CC_ARM )
285301#include <sys/types.h>
286302#define MICROPY_NO_ALLOCA 1
@@ -498,6 +514,7 @@ extern const struct _mp_obj_module_t mp_module_userfunc;
498514 MODFFI_PORT_BUILTIN_MODULES \
499515 MODNETWORK_PORT_BUILTIN_MODULES \
500516 USERFUNC_PORT_BUILTIN_MODULES \
517+ MICROPY_USER_MODULES \
501518
502519#define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \
503520 MODUTIME_PORT_BUILTIN_MODULE_WEAK_LINKS \
Original file line number Diff line number Diff line change @@ -109,6 +109,9 @@ const qstr_pool_t mp_qstr_const_pool = {
109109#ifndef NO_QSTR
110110#define QDEF (id , str ) str ,
111111#include "genhdr/qstrdefs.generated.h"
112+ #if (MICROPY_USER_EXTMODS == 1 )
113+ #include < qstrdefs .user .extmods .h >
114+ #endif
112115#undef QDEF
113116#endif
114117 },
Original file line number Diff line number Diff line change 4040#ifndef NO_QSTR
4141#define QDEF (id , str ) id,
4242#include "genhdr/qstrdefs.generated.h"
43+ #if (MICROPY_USER_EXTMODS == 1 )
44+ #include <qstrdefs.user.extmods.h>
45+ #endif
4346#undef QDEF
4447#endif
4548 MP_QSTRnumber_of , // no underscore so it can't clash with any of the above
You can’t perform that action at this time.
0 commit comments