2014-04-12 08:07:45 -04:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2017-06-30 03:22:17 -04:00
|
|
|
// options to control how MicroPython is built
|
2014-04-12 08:07:45 -04:00
|
|
|
|
2015-07-20 07:03:13 -04:00
|
|
|
#define MICROPY_QSTR_BYTES_IN_HASH (1)
|
2014-05-21 15:32:59 -04:00
|
|
|
#define MICROPY_ALLOC_PATH_MAX (512)
|
2014-04-12 08:07:45 -04:00
|
|
|
#define MICROPY_EMIT_X64 (0)
|
|
|
|
#define MICROPY_EMIT_THUMB (0)
|
|
|
|
#define MICROPY_EMIT_INLINE_THUMB (0)
|
2015-01-10 09:07:24 -05:00
|
|
|
#define MICROPY_COMP_MODULE_CONST (0)
|
|
|
|
#define MICROPY_COMP_CONST (0)
|
2015-03-14 09:11:35 -04:00
|
|
|
#define MICROPY_COMP_DOUBLE_TUPLE_ASSIGN (0)
|
|
|
|
#define MICROPY_COMP_TRIPLE_TUPLE_ASSIGN (0)
|
2014-04-12 08:07:45 -04:00
|
|
|
#define MICROPY_MEM_STATS (0)
|
|
|
|
#define MICROPY_DEBUG_PRINTERS (0)
|
|
|
|
#define MICROPY_ENABLE_GC (0)
|
2014-05-21 15:32:59 -04:00
|
|
|
#define MICROPY_HELPER_REPL (0)
|
|
|
|
#define MICROPY_HELPER_LEXER_UNIX (0)
|
2014-04-12 08:07:45 -04:00
|
|
|
#define MICROPY_ENABLE_SOURCE_LINE (0)
|
2014-11-06 12:36:16 -05:00
|
|
|
#define MICROPY_ENABLE_DOC_STRING (0)
|
|
|
|
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_TERSE)
|
2015-06-19 08:49:10 -04:00
|
|
|
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (0)
|
2016-04-13 10:31:30 -04:00
|
|
|
#define MICROPY_PY_ASYNC_AWAIT (0)
|
2014-06-27 13:43:35 -04:00
|
|
|
#define MICROPY_PY_BUILTINS_BYTEARRAY (0)
|
2018-08-05 18:25:41 -04:00
|
|
|
#define MICROPY_PY_BUILTINS_DICT_FROMKEYS (0)
|
2014-10-23 08:34:35 -04:00
|
|
|
#define MICROPY_PY_BUILTINS_MEMORYVIEW (0)
|
2015-08-02 15:55:37 -04:00
|
|
|
#define MICROPY_PY_BUILTINS_ENUMERATE (0)
|
2014-06-01 08:49:54 -04:00
|
|
|
#define MICROPY_PY_BUILTINS_FROZENSET (0)
|
2015-08-02 15:55:37 -04:00
|
|
|
#define MICROPY_PY_BUILTINS_REVERSED (0)
|
2014-06-01 08:49:54 -04:00
|
|
|
#define MICROPY_PY_BUILTINS_SET (0)
|
|
|
|
#define MICROPY_PY_BUILTINS_SLICE (0)
|
2014-06-01 08:32:54 -04:00
|
|
|
#define MICROPY_PY_BUILTINS_PROPERTY (0)
|
2018-08-05 16:56:19 -04:00
|
|
|
#define MICROPY_PY_BUILTINS_STR_COUNT (0)
|
2018-08-15 08:17:41 -04:00
|
|
|
#define MICROPY_PY_BUILTINS_STR_OP_MODULO (0)
|
2014-09-08 05:45:23 -04:00
|
|
|
#define MICROPY_PY___FILE__ (0)
|
2014-08-12 15:16:03 -04:00
|
|
|
#define MICROPY_PY_GC (0)
|
2014-06-27 13:43:35 -04:00
|
|
|
#define MICROPY_PY_ARRAY (0)
|
2015-04-21 10:14:24 -04:00
|
|
|
#define MICROPY_PY_ATTRTUPLE (0)
|
2014-05-24 18:03:12 -04:00
|
|
|
#define MICROPY_PY_COLLECTIONS (0)
|
|
|
|
#define MICROPY_PY_MATH (0)
|
|
|
|
#define MICROPY_PY_CMATH (0)
|
|
|
|
#define MICROPY_PY_IO (0)
|
|
|
|
#define MICROPY_PY_STRUCT (0)
|
|
|
|
#define MICROPY_PY_SYS (0)
|
2014-04-13 08:19:28 -04:00
|
|
|
#define MICROPY_CPYTHON_COMPAT (0)
|
2020-02-29 08:06:15 -05:00
|
|
|
#define MICROPY_MODULE_GETATTR (0)
|
2014-04-12 08:07:45 -04:00
|
|
|
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE)
|
|
|
|
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_NONE)
|
2016-08-21 05:33:37 -04:00
|
|
|
#define MICROPY_USE_INTERNAL_PRINTF (0)
|
2014-04-12 08:07:45 -04:00
|
|
|
|
|
|
|
// type definitions for the specific machine
|
|
|
|
|
2020-02-26 23:36:53 -05:00
|
|
|
#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p) | 1))
|
2014-08-24 11:28:17 -04:00
|
|
|
|
2014-04-12 08:07:45 -04:00
|
|
|
#define UINT_FMT "%lu"
|
|
|
|
#define INT_FMT "%ld"
|
|
|
|
|
2014-07-03 08:25:24 -04:00
|
|
|
typedef int32_t mp_int_t; // must be pointer size
|
|
|
|
typedef uint32_t mp_uint_t; // must be pointer size
|
2014-11-16 17:16:14 -05:00
|
|
|
typedef long mp_off_t;
|
2014-04-12 08:07:45 -04:00
|
|
|
|
2015-10-14 19:05:55 -04:00
|
|
|
// dummy print
|
|
|
|
#define MP_PLAT_PRINT_STRN(str, len) (void)0
|
|
|
|
|
2014-04-12 08:07:45 -04:00
|
|
|
// extra built in names to add to the global namespace
|
2014-05-21 15:32:59 -04:00
|
|
|
#define MICROPY_PORT_BUILTINS \
|
2017-08-21 07:34:23 -04:00
|
|
|
{ MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) },
|
2014-04-12 08:07:45 -04:00
|
|
|
|
2014-06-08 08:25:33 -04:00
|
|
|
// We need to provide a declaration/definition of alloca()
|
|
|
|
#include <alloca.h>
|