3131/****************************** user define ************************************/
3232// python grammar
3333#define MICROPY_PY_ATTRTUPLE (1)
34- #define MICROPY_PY_BUILTINS_BYTEARRAY (1)
35- #define MICROPY_CPYTHON_COMPAT (1)
34+ #define MICROPY_PY_BUILTINS_BYTEARRAY (1)
35+ #define MICROPY_CPYTHON_COMPAT (1)
3636
3737// builtin op
3838#define MICROPY_PY_BUILTINS_STR_OP_MODULO (1)
4242
4343// modules
4444#define MICROPY_PY_IO (1)
45- #define MICROPY_PY_JSON (1)
45+ #define MICROPY_PY_JSON (1)
4646#define MICROPY_VFS (1)
47- #define MICROPY_QPY_MODULE_UOS (0)
4847#define MICROPY_PY_VFS (0)
48+ #define MICROPY_VFS_LFS2 (1)
4949#define MICROPY_PY_TIME (0)
5050#define MICROPY_PY_HEAPQ (0)
5151#define MICROPY_PY_OS (1)
5454#define MICROPY_PY_FRAMEBUF (0)
5555#define MICROPY_PY_ASYNCIO (0)
5656#define MICROPY_PY_BINASCII_CRC32 (0)
57-
58- #define MICROPY_PY_UCTYPES (MICROPY_QPY_PY_UCTYPES)
59- #define MICROPY_PY_DEFLATE (0)
60-
57+ #define MICROPY_PY_UCTYPES (0)
58+ #define MICROPY_PY_DEFLATE (0)
6159#define MICROPY_OPT_COMPUTED_GOTO (1)
6260
6361/******************************** base define **********************************/
6462// options to control how MicroPython is built
65-
66- // Use the minimal starting configuration (disables all optional features).
6763#define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES)
6864
6965// You can disable the built-in MicroPython compiler by setting the following
9086#define MICROPY_SCHEDULER_STATIC_NODES (0)
9187#define MICROPY_SCHEDULER_DEPTH (64)// 8
9288#define MICROPY_REPL_AUTO_INDENT (1)
93- #define MICROPY_PY_UTIME_MP_HAL (1)
94-
95-
89+ #define MICROPY_PY_UTIME_MP_HAL (1)
9690#define MICROPY_PY_THREAD (1)
97- #define MICROPY_PY_THREAD_GIL (1)
98- #define MICROPY_ENABLE_CALLBACK_DEAL (0)
9991#define MICROPY_READER_VFS (1)
100-
10192#define MICROPY_KBD_EXCEPTION (1)
10293#define MICROPY_PY_SOFT_RESET (0)
103- #define MICROPY_PY_IO_FILEIO (1)
104- #define MICROPY_PY_BUILTINS_SLICE (1)
105- #define MICROPY_PY_BUILTINS_PROPERTY (1)
106- #define MICROPY_PY_BUILTINS_BYTEARRAY (1)
107- #define MICROPY_PY_BUILTINS_SET (1)
108- #define MICROPY_PY_BUILTINS_MEMORYVIEW (1)
109- #define MICROPY_PY_SYS_STDFILES (1)
110- #define MICROPY_PY_SYS_STDIO_BUFFER (1)
111- #define MICROPY_PY_STRUCT (1)
112- #define MICROPY_ENABLE_FINALISER (1)
113- #define MICROPY_PY_BUILTINS_ENUMERATE (1)
114- #define MICROPY_PY_BUILTINS_MIN_MAX (1)
115- #if defined(PLAT_EIGEN ) || defined(PLAT_EIGEN_718 )
116- #define MICROPY_PY_URANDOM (1)
117- #define MICROPY_PY_URANDOM_EXTRA_FUNCS (1)
118- #endif
119-
12094#define MICROPY_PERSISTENT_CODE_LOAD (1)
121- #define MICROPY_PY_MICROPYTHON (1)
122- #define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
12395
12496#ifndef SSIZE_MAX
12597#define SSIZE_MAX 0xFFFFFFFF
12698#endif
12799
128- #if defined(PLAT_Unisoc ) \
129- || defined(PLAT_Unisoc_8850 ) \
130- || defined(PLAT_ASR_1803s ) \
131- || defined(PLAT_RDA ) \
132- || defined(PLAT_Qualcomm ) \
133- || defined(PLAT_ASR )
100+ #if defined(PLAT_Unisoc )
134101#define MICROPY_PY_REPL_PASSWORD_PROTECT (1)
135102#endif
136103
137- #if defined(PLAT_SONY_ALT1350 )
138- #define MICROPY_PY_USOCKET_EVENTS (1)
139- #endif
140-
141- #if defined(PLAT_SONY_ALT1350 )
142- #define MICROPY_PY_USSL (1)
143- #define MICROPY_SSL_MBEDTLS (1)
144- #endif
145-
146- #if defined(PLAT_Qualcomm )
147- #define mp_type_fileio mp_type_vfs_efs_fileio
148- #define mp_type_textio mp_type_vfs_efs_textio
149- #elif defined(PLAT_EIGEN )
150- #define mp_type_fileio mp_type_vfs_lfs2_fileio
151- #define mp_type_textio mp_type_vfs_lfs2_textio
152- #elif defined(PLAT_EIGEN_718 )
153- #define mp_type_fileio mp_type_vfs_lfs2_fileio
154- #define mp_type_textio mp_type_vfs_lfs2_textio
155- #else
156104#define mp_type_fileio mp_type_vfs_lfs1_fileio
157105#define mp_type_textio mp_type_vfs_lfs1_textio
158- #endif
159-
160106
161107// type definitions for the specific machine
162108
@@ -166,7 +112,6 @@ typedef long mp_off_t;
166112#define UINT_FMT "%lu"
167113#define INT_FMT "%ld"
168114
169-
170115#if MICROPY_ENABLE_GC
171116#ifndef MICROPY_QPY_GC_HEAP_SIZE
172117#define MICROPY_QPY_GC_HEAP_SIZE (512 * 1024)
@@ -177,29 +122,8 @@ typedef long mp_off_t;
177122#ifdef MICROPY_QPY_MAIN_TASK_STACK_SIZE
178123#define MP_QPY_TASK_STACK_SIZE (MICROPY_QPY_MAIN_TASK_STACK_SIZE)
179124#else
180- #if defined(PLAT_RDA )
181- #define MP_QPY_TASK_STACK_SIZE (32 * 1024)
182- #elif defined(PLAT_EIGEN )
183- #define MP_QPY_TASK_STACK_SIZE (32 * 1024)
184- #elif defined(PLAT_EIGEN_718 )
185- #define MP_QPY_TASK_STACK_SIZE (8 * 1024)
186- #elif defined(PLAT_ECR6600 )
187- #define MP_QPY_TASK_STACK_SIZE (8 * 1024)
188- #elif defined(PLAT_aic8800m40 )
189- #define MP_QPY_TASK_STACK_SIZE (10 * 1024)
190- #elif defined(PLAT_Unisoc_8850 ) || defined(PLAT_Unisoc_8850_R02 )
191- #if defined(BOARD_EC600GCN_LD ) || defined(BOARD_EC800GCN_LD ) || defined(BOARD_EC800GCN_LD_XBND ) \
192- || defined(BOARD_EC800GCN_LD_HRXM ) || defined(BOARD_EC600GCN_LD_YM ) || defined(BOARD_EC800GCN_TT ) \
193- || defined(BOARD_EG800GLA_LD )
194- #define MP_QPY_TASK_STACK_SIZE (16 * 1024)
195- #else
196- #define MP_QPY_TASK_STACK_SIZE (64 * 1024)
197- #endif
198- #else
199125#define MP_QPY_TASK_STACK_SIZE (64 * 1024)
200126#endif
201- #endif
202-
203127
204128// We need to provide a declaration/definition of alloca()
205129#include <alloca.h>
@@ -223,7 +147,6 @@ typedef long mp_off_t;
223147
224148#define MP_STATE_PORT MP_STATE_VM
225149
226-
227150#if MICROPY_PY_THREAD
228151#define MICROPY_EVENT_POLL_HOOK \
229152 do { \
@@ -235,7 +158,7 @@ typedef long mp_off_t;
235158#else
236159#define MICROPY_EVENT_POLL_HOOK \
237160 do { \
238- extern void mp_handle_pending(bool ); \
161+ extern void mp_handle_pending(mp_handle_pending_behaviour_t behavior ); \
239162 mp_handle_pending(true); \
240163 asm ("waiti 0"); \
241164 } while (0);
0 commit comments