| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- // Need to provide a declaration/definition of alloca()
- #if defined(__FreeBSD__) || defined(__NetBSD__)
- #include <stdlib.h>
- #else
- #include <alloca.h>
- #endif
- #include <stdint.h>
- #ifndef MP_FLIPPER_IS_COMPILER
- #ifndef MP_FLIPPER_COMPILER
- #define MP_FLIPPER_IS_COMPILER (0)
- #else
- #define MP_FLIPPER_IS_COMPILER (1)
- #endif
- #endif
- #ifndef MP_FLIPPER_IS_RUNTIME
- #ifndef MP_FLIPPER_RUNTIME
- #define MP_FLIPPER_IS_RUNTIME (0)
- #else
- #define MP_FLIPPER_IS_RUNTIME (1)
- #endif
- #endif
- // Type definitions for the specific machine
- typedef int32_t mp_int_t; // must be pointer size
- typedef uint32_t mp_uint_t; // must be pointer size
- typedef long mp_off_t;
- #ifdef MP_FLIPPER_SPLIT_HEAP
- #define MICROPY_GC_SPLIT_HEAP (1)
- #define MICROPY_GC_SPLIT_HEAP_AUTO (1)
- #endif
- #define MICROPY_MPHALPORT_H "mp_flipper_halport.h"
- #define MICROPY_MIN_USE_CORTEX_CPU (1)
- #define MICROPY_MIN_USE_STM32_MCU (1)
- #define MICROPY_HW_BOARD_NAME "Flipper Zero"
- #define MICROPY_HW_MCU_NAME "STM32WB55RG"
- #define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_CORE_FEATURES)
- #ifdef MP_FLIPPER_MPY_SUPPORT
- #define MICROPY_PERSISTENT_CODE_LOAD (MP_FLIPPER_IS_RUNTIME)
- #define MICROPY_PERSISTENT_CODE_SAVE (MP_FLIPPER_IS_COMPILER)
- #else
- #define MICROPY_PERSISTENT_CODE_LOAD (0)
- #define MICROPY_PERSISTENT_CODE_SAVE (0)
- #endif
- #define MICROPY_PERSISTENT_CODE_SAVE_FILE (0)
- #define MICROPY_ENABLE_COMPILER (MP_FLIPPER_IS_COMPILER)
- #define MICROPY_ENABLE_GC (1)
- #define MICROPY_PY_GC_COLLECT_RETVAL (1)
- #define MICROPY_ENABLE_PYSTACK (0)
- #define MICROPY_STACK_CHECK (1)
- #define MICROPY_ALLOC_PATH_MAX (256)
- #define MICROPY_ENABLE_FINALISER (0)
- #ifdef MP_FLIPPER_FIRMWARE
- #define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_TERSE)
- #else
- #define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_NONE)
- #endif
- #define MICROPY_GC_STACK_ENTRY_TYPE uint32_t
- #define MICROPY_PY___FILE__ (1)
- #define MICROPY_ENABLE_EXTERNAL_IMPORT (1)
- #define MICROPY_READER_VFS (1)
- #define MICROPY_ENABLE_VM_ABORT (0)
- #define MICROPY_PY_ERRNO (0)
- #define MICROPY_USE_INTERNAL_ERRNO (0)
- #define MICROPY_PY_ERRNO_ERRORCODE (0)
- #define MICROPY_PY_TIME (1)
- #define MICROPY_PY_TIME_TIME_TIME_NS (1)
- #define MICROPY_PY_RANDOM (1)
- #define MICROPY_PY_RANDOM_EXTRA_FUNCS (0)
- #define MICROPY_PY_RANDOM_SEED_INIT_FUNC (mp_flipper_seed_init())
- #ifdef MP_FLIPPER_FIRMWARE
- #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_LONGLONG)
- #else
- #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE)
- #endif
- #ifdef MP_FLIPPER_FIRMWARE
- #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
- #else
- #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
- #endif
- #ifdef MP_FLIPPER_FIRMWARE
- #define MICROPY_HELPER_REPL (MP_FLIPPER_IS_COMPILER)
- #else
- #define MICROPY_HELPER_REPL (0)
- #endif
- #define MICROPY_ENABLE_SOURCE_LINE (0)
- #define MICROPY_ENABLE_DOC_STRING (0)
- #define MICROPY_REPL_INFO (0)
- #define MICROPY_REPL_EMACS_KEYS (0)
- #define MICROPY_REPL_EMACS_WORDS_MOVE (0)
- #define MICROPY_REPL_EMACS_EXTRA_WORDS_MOVE (0)
- #define MICROPY_REPL_AUTO_INDENT (0)
- #define MICROPY_REPL_EVENT_DRIVEN (0)
- #define MICROPY_READLINE_HISTORY_SIZE (0)
- #define MICROPY_CPYTHON_COMPAT (1)
- #define MICROPY_FULL_CHECKS (0)
- #define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (0)
- #define MICROPY_MODULE_FROZEN_MPY (0)
- #define MICROPY_PY_CMATH (0)
- #define MICROPY_PY_BUILTINS_COMPLEX (0)
- #define MICROPY_MULTIPLE_INHERITANCE (0)
- #define MICROPY_MODULE_GETATTR (0)
- #define MICROPY_PY_FUNCTION_ATTRS (1)
- #define MICROPY_PY_DESCRIPTORS (0)
- #define MICROPY_PY_ASYNC_AWAIT (0)
- #define MICROPY_PY_ASSIGN_EXPR (0)
- #define MICROPY_PY_GENERATOR_PEND_THROW (0)
- #define MICROPY_PY_BUILTINS_BYTES_HEX (0)
- #define MICROPY_PY_BUILTINS_STR_UNICODE (0)
- #define MICROPY_PY_BUILTINS_STR_CENTER (0)
- #define MICROPY_PY_BUILTINS_STR_COUNT (0)
- #define MICROPY_PY_BUILTINS_STR_OP_MODULO (0)
- #define MICROPY_PY_BUILTINS_STR_PARTITION (0)
- #define MICROPY_PY_BUILTINS_STR_SPLITLINES (0)
- #define MICROPY_PY_BUILTINS_BYTEARRAY (0)
- #define MICROPY_PY_BUILTINS_DICT_FROMKEYS (0)
- #define MICROPY_PY_BUILTINS_MEMORYVIEW (0)
- #define MICROPY_PY_BUILTINS_SET (1)
- #define MICROPY_PY_BUILTINS_SLICE (0)
- #define MICROPY_PY_BUILTINS_SLICE_ATTRS (0)
- #define MICROPY_PY_BUILTINS_SLICE_INDICES (0)
- #define MICROPY_PY_BUILTINS_FROZENSET (0)
- #define MICROPY_PY_BUILTINS_PROPERTY (0)
- #define MICROPY_PY_BUILTINS_RANGE_ATTRS (0)
- #define MICROPY_PY_BUILTINS_RANGE_BINOP (0)
- #define MICROPY_PY_BUILTINS_NEXT2 (0)
- #define MICROPY_PY_BUILTINS_ROUND_INT (0)
- #define MICROPY_PY_ALL_SPECIAL_METHODS (0)
- #define MICROPY_PY_REVERSE_SPECIAL_METHODS (0)
- #define MICROPY_PY_BUILTINS_ENUMERATE (0)
- #define MICROPY_PY_BUILTINS_COMPILE (0)
- #define MICROPY_PY_BUILTINS_EVAL_EXEC (0)
- #define MICROPY_PY_BUILTINS_EXECFILE (0)
- #define MICROPY_PY_BUILTINS_FILTER (1)
- #define MICROPY_PY_BUILTINS_REVERSED (1)
- #define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
- #define MICROPY_PY_BUILTINS_INPUT (0)
- #define MICROPY_PY_BUILTINS_MIN_MAX (1)
- #define MICROPY_PY_BUILTINS_POW3 (0)
- #define MICROPY_PY_BUILTINS_HELP (0)
- #define MICROPY_PY_MICROPYTHON (0)
- #define MICROPY_PY_MICROPYTHON_MEM_INFO (0)
- #define MICROPY_PY_MICROPYTHON_STACK_USE (0)
- #define MICROPY_PY_MICROPYTHON_HEAP_LOCKED (0)
- #define MICROPY_PY_ARRAY (0)
- #define MICROPY_PY_ARRAY_SLICE_ASSIGN (0)
- #define MICROPY_PY_ATTRTUPLE (0)
- #define MICROPY_PY_COLLECTIONS (0)
- #define MICROPY_PY_STRUCT (0)
- #define MICROPY_PY_GC (0)
- #define MICROPY_PY_SYS (0)
- #define MICROPY_PY_SYS_MODULES (0)
- #define MICROPY_PY_SELECT_SELECT (0)
- #define MICROPY_PY_SYS_EXIT (0)
- #define MICROPY_PY_RE (0)
- #define MICROPY_PY_CRYPTOLIB (0)
- #define MICROPY_PY_VFS (0)
- #define MICROPY_ENABLE_SCHEDULER (1)
- #define MICROPY_MODULE_BUILTIN_INIT (1)
- #ifdef MP_FLIPPER_MATH
- #define MICROPY_PY_MATH (1)
- #else
- #define MICROPY_PY_MATH (0)
- #endif
- #ifdef MP_FLIPPER_IO
- #define MICROPY_PY_IO (1)
- #else
- #define MICROPY_PY_IO (0)
- #endif
- #ifdef MP_FLIPPER_JSON
- #define MICROPY_PY_JSON (1)
- #define MICROPY_PY_JSON_SEPARATORS (1)
- #else
- #define MICROPY_PY_JSON (0)
- #define MICROPY_PY_JSON_SEPARATORS (0)
- #endif
- #define MICROPY_COMP_CONST_FOLDING (0)
- #define MICROPY_COMP_CONST_TUPLE (0)
- #define MICROPY_COMP_CONST_LITERAL (0)
- #define MICROPY_COMP_CONST (0)
- #define MICROPY_COMP_DOUBLE_TUPLE_ASSIGN (0)
|