blob: 6deb442b8d9b44a827910dd964e7778fa1fb0d0c [file] [log] [blame]
Paul Sokolovskyb372bfc2014-01-03 17:15:53 +02001// This file contains default configuration settings for MicroPython.
2// You can override any of these options using mpconfigport.h file located
3// in a directory of your port.
4
5#include <mpconfigport.h>
6
Damien George136f6752014-01-07 14:54:15 +00007// Any options not explicitly set in mpconfigport.h will get default
8// values below.
9
10/*****************************************************************************/
11/* Micro Python emitters */
12
13// Whether to emit CPython byte codes (for debugging/testing)
14// Enabling this overrides all other emitters
15#ifndef MICROPY_EMIT_CPYTHON
16#define MICROPY_EMIT_CPYTHON (0)
17#endif
18
19// Whether to emit x64 native code
20#ifndef MICROPY_EMIT_X64
21#define MICROPY_EMIT_X64 (0)
22#endif
23
24// Whether to emit thumb native code
25#ifndef MICROPY_EMIT_THUMB
26#define MICROPY_EMIT_THUMB (0)
27#endif
28
29// Whether to enable the thumb inline assembler
30#ifndef MICROPY_EMIT_INLINE_THUMB
31#define MICROPY_EMIT_INLINE_THUMB (0)
32#endif
33
34/*****************************************************************************/
35/* Internal debugging stuff */
36
37// Whether to collect memory allocation stats
38#ifndef MICROPY_MEM_STATS
39#define MICROPY_MEM_STATS (0)
40#endif
41
Damien Georged3ebe482014-01-07 15:20:33 +000042// Whether to build code to show byte code
43#ifndef MICROPY_SHOW_BC
44#define MICROPY_SHOW_BC (0)
45#endif
46
Damien George136f6752014-01-07 14:54:15 +000047/*****************************************************************************/
48/* Fine control over Python features */
49
Damien Georged3ebe482014-01-07 15:20:33 +000050// Whether to include the garbage collector
51#ifndef MICROPY_ENABLE_GC
52#define MICROPY_ENABLE_GC (0)
53#endif
54
Damien George136f6752014-01-07 14:54:15 +000055// Whether to include REPL helper function
56#ifndef MICROPY_ENABLE_REPL_HELPERS
57#define MICROPY_ENABLE_REPL_HELPERS (0)
58#endif
59
Damien Georged3ebe482014-01-07 15:20:33 +000060// Whether to include lexer helper function for unix
61#ifndef MICROPY_ENABLE_LEXER_UNIX
62#define MICROPY_ENABLE_LEXER_UNIX (0)
63#endif
64
Damien George136f6752014-01-07 14:54:15 +000065// Whether to support float and complex types
66#ifndef MICROPY_ENABLE_FLOAT
67#define MICROPY_ENABLE_FLOAT (0)
68#endif
69
70// Whether to support slice object and correspondingly
71// slice subscript operators
72#ifndef MICROPY_ENABLE_SLICE
73#define MICROPY_ENABLE_SLICE (1)
74#endif
75
76/*****************************************************************************/
77/* Miscellaneous settings */
78
Paul Sokolovskyfc5aac82014-01-12 16:10:19 +020079#define BITS_PER_BYTE (8)
80#define BITS_PER_WORD (BITS_PER_BYTE * BYTES_PER_WORD)
Paul Sokolovskyc260bc52014-01-12 16:15:47 +020081// machine_int_t value with most significant bit set
82#define WORD_MSBIT_HIGH (1 << (BYTES_PER_WORD * 8 - 1))
Paul Sokolovskyfc5aac82014-01-12 16:10:19 +020083
Paul Sokolovskyc90c0f62014-01-04 01:57:00 +020084// printf format spec to use for machine_int_t and friends
Damien George136f6752014-01-07 14:54:15 +000085#ifndef INT_FMT
Paul Sokolovskyc90c0f62014-01-04 01:57:00 +020086#ifdef __LP64__
87// Archs where machine_int_t == long, long != int
88#define UINT_FMT "%lu"
89#define INT_FMT "%ld"
90#else
91// Archs where machine_int_t == int
92#define UINT_FMT "%u"
93#define INT_FMT "%d"
94#endif
95#endif //INT_FMT