39#define MICROPY_GCREGS_SETJMP 1
40#define MICROPY_NLR_SETJMP 1
42#if __IS_COMPILER_IAR__
43#define MICROPY_NO_ALLOCA 1
49#include "mpconfigvariant.h"
51#ifndef MICROPY_CONFIG_ROM_LEVEL
52#define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_CORE_FEATURES)
55#ifndef MICROPY_PY_SYS_PLATFORM
56#if defined(__APPLE__) && defined(__MACH__)
57 #define MICROPY_PY_SYS_PLATFORM "darwin"
59 #define MICROPY_PY_SYS_PLATFORM "linux"
63#ifndef MICROPY_PY_SYS_PATH_DEFAULT
65#define MICROPY_PY_SYS_PATH_DEFAULT "/usr/micropython/lib"
67#define MICROPY_PY_SYS_PATH_DEFAULT "/root/micropython/lib"
71#define MP_STATE_PORT MP_STATE_VM
74#if !defined(MICROPY_EMIT_X64) && defined(__x86_64__)
75 #define MICROPY_EMIT_X64 (1)
77#if !defined(MICROPY_EMIT_X86) && defined(__i386__)
78 #define MICROPY_EMIT_X86 (1)
80#if !defined(MICROPY_EMIT_THUMB) && defined(__thumb2__)
81 #define MICROPY_EMIT_THUMB (1)
82 #define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p) | 1))
86#if !defined(MICROPY_EMIT_ARM) && defined(__arm__) && !defined(__thumb2__)
87 #define MICROPY_EMIT_ARM (1)
91#ifndef MICROPY_OBJ_REPR
99#if _FILE_OFFSET_BITS == 64 && !defined(__LP64__)
107#if !defined(MICROPY_NO_ALLOCA) || MICROPY_NO_ALLOCA == 0
108#if defined(__FreeBSD__) || defined(__NetBSD__)
116#define MICROPY_ENABLE_GC (1)
118#if !(defined(MICROPY_GCREGS_SETJMP) || defined(__x86_64__) || defined(__i386__) || defined(__thumb2__) || defined(__thumb__) || defined(__arm__))
120#define MICROPY_GCREGS_SETJMP (1)
124#define MICROPY_ENABLE_FINALISER (1)
125#define MICROPY_VFS (0)
126#define MICROPY_READER_VFS (0)
127#define MICROPY_HELPER_LEXER_UNIX (1)
128#define MICROPY_VFS_POSIX (0)
129#define MICROPY_READER_POSIX (1)
130#ifndef MICROPY_TRACKED_ALLOC
131#define MICROPY_TRACKED_ALLOC (MICROPY_BLUETOOTH_BTSTACK)
135#define MICROPY_EPOCH_IS_1970 (1)
139#define MICROPY_SELECT_REMAINING_TIME (1)
142#ifndef MICROPY_STACKLESS
143#define MICROPY_STACKLESS (0)
144#define MICROPY_STACKLESS_STRICT (0)
148#if MICROPY_PY_SYS_SETTRACE
149#define MICROPY_PERSISTENT_CODE_SAVE (1)
150#define MICROPY_COMP_CONST (0)
154#define MICROPY_MACHINE_MEM_GET_READ_ADDR mod_machine_mem_get_addr
155#define MICROPY_MACHINE_MEM_GET_WRITE_ADDR mod_machine_mem_get_addr
157#define MICROPY_FATFS_ENABLE_LFN (1)
158#define MICROPY_FATFS_RPATH (2)
159#define MICROPY_FATFS_MAX_SS (4096)
160#define MICROPY_FATFS_LFN_CODE_PAGE 437
162#define MICROPY_ALLOC_PATH_MAX (PATH_MAX)
165#define MICROPY_MODULE_OVERRIDE_MAIN_IMPORT (1)
168#define MICROPY_PY_SYS_PATH_ARGV_DEFAULTS (0)
171#define MICROPY_PY_SYS_EXECUTABLE (1)
173#define MICROPY_PY_SOCKET_LISTEN_BACKLOG_DEFAULT (SOMAXCONN < 128 ? SOMAXCONN : 128)
178#define MICROPY_DEBUG_PRINTER (&mp_stderr_print)
179#define MICROPY_ERROR_PRINTER (&mp_stderr_print)
185#define MP_PLAT_ALLOC_EXEC(min_size, ptr, size) mp_unix_alloc_exec(min_size, ptr, size)
186#define MP_PLAT_FREE_EXEC(ptr, size) mp_unix_free_exec(ptr, size)
187#ifndef MICROPY_FORCE_PLAT_ALLOC_EXEC
190#define MICROPY_FORCE_PLAT_ALLOC_EXEC (1)
194#ifdef MICROPY_PY_RANDOM_SEED_INIT_FUNC
196void mp_hal_get_random(
size_t n,
void *buf);
197static inline unsigned long mp_random_seed_init(
void) {
199 mp_hal_get_random(
sizeof(r), &r);
206#define MICROPY_PLAT_DEV_MEM (1)
210#include <android/api-level.h>
211#if __ANDROID_API__ < 4
213#define MP_NEED_LOG2 (1)
223#ifndef _DIRENT_HAVE_D_TYPE
224#define _DIRENT_HAVE_D_TYPE (1)
228#ifndef _DIRENT_HAVE_D_INO
229#define _DIRENT_HAVE_D_INO (1)
239#define MICROPY_BEGIN_ATOMIC_SECTION() (mp_thread_unix_begin_atomic_section(), 0xffffffff)
240#define MICROPY_END_ATOMIC_SECTION(x) (void)x; mp_thread_unix_end_atomic_section()
244#ifndef MICROPY_EVENT_POLL_HOOK
245#define MICROPY_EVENT_POLL_HOOK \
247 extern void mp_handle_pending(bool); \
248 mp_handle_pending(true); \
255#define MICROPY_UNIX_MACHINE_IDLE sched_yield();
257#ifndef MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE
258#define MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE (1)
261#ifndef MICROPY_PY_BLUETOOTH_ENABLE_L2CAP_CHANNELS
262#define MICROPY_PY_BLUETOOTH_ENABLE_L2CAP_CHANNELS (MICROPY_BLUETOOTH_NIMBLE)
long mp_off_t
Definition mpconfigport.h:102
void mp_unix_alloc_exec(size_t min_size, void **ptr, size_t *size)
intptr_t mp_int_t
Definition mpconfigport.h:92
void mp_unix_free_exec(void *ptr, size_t size)
const struct _mp_print_t mp_stderr_print
uintptr_t mp_uint_t
Definition mpconfigport.h:93
void mp_unix_mark_exec(void)
uint32_t uintptr_t
Definition stdint.h:38
int32_t intptr_t
Definition stdint.h:39
uint32_t size
Definition vsf_memfs.h:50