blob: 3798f88b5835af6c8ed04ccf99b33e06843c4bdc [file] [log] [blame]
Damienc025ebb2013-10-12 14:30:21 +01001// options to control how Micro Python is built
2
Damiend2755ec2013-10-16 23:58:48 +01003#define MICROPY_EMIT_X64 (1)
Damien3ef4abb2013-10-12 16:53:13 +01004#define MICROPY_EMIT_THUMB (0)
5#define MICROPY_EMIT_INLINE_THUMB (0)
Paul Sokolovsky78e8e302014-04-02 20:57:19 +03006#define MICROPY_ENABLE_GC (1)
Damien George12bab722014-04-05 20:35:48 +01007#define MICROPY_ENABLE_FINALISER (1)
Damien George136f6752014-01-07 14:54:15 +00008#define MICROPY_MEM_STATS (1)
Damien Georgecbd2f742014-01-19 11:48:48 +00009#define MICROPY_DEBUG_PRINTERS (1)
Damien George136f6752014-01-07 14:54:15 +000010#define MICROPY_ENABLE_REPL_HELPERS (1)
Damien Georged3ebe482014-01-07 15:20:33 +000011#define MICROPY_ENABLE_LEXER_UNIX (1)
Damien George62ad1892014-01-29 21:51:51 +000012#define MICROPY_ENABLE_SOURCE_LINE (1)
Damien George0c36da02014-03-08 15:24:39 +000013#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
Damien George438c88d2014-02-22 19:25:23 +000014#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
Damien George354d15a2014-02-06 21:11:19 +000015#define MICROPY_PATH_MAX (PATH_MAX)
Damienc025ebb2013-10-12 14:30:21 +010016
17// type definitions for the specific machine
18
Paul Sokolovskye85c3892013-12-30 03:38:32 +020019#ifdef __LP64__
20typedef long machine_int_t; // must be pointer size
21typedef unsigned long machine_uint_t; // must be pointer size
Paul Sokolovskye85c3892013-12-30 03:38:32 +020022#else
23// These are definitions for machines where sizeof(int) == sizeof(void*),
24// regardless for actual size.
25typedef int machine_int_t; // must be pointer size
26typedef unsigned int machine_uint_t; // must be pointer size
Paul Sokolovskye85c3892013-12-30 03:38:32 +020027#endif
Damiend276f632013-10-22 16:05:47 +010028
Paul Sokolovskye85c3892013-12-30 03:38:32 +020029#define BYTES_PER_WORD sizeof(machine_int_t)
30
Damienc025ebb2013-10-12 14:30:21 +010031typedef void *machine_ptr_t; // must be of pointer size
Damiend99b0522013-12-21 18:17:45 +000032typedef const void *machine_const_ptr_t; // must be of pointer size
Paul Sokolovsky910843e2014-02-14 12:02:34 +020033
34struct _mp_obj_fun_native_t;
35extern const struct _mp_obj_fun_native_t mp_builtin_open_obj;
36#define MICROPY_EXTRA_BUILTINS \
Damien George7efc5b32014-04-05 22:36:42 +010037 { MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },