Skip to content

Commit 009c51c

Browse files
robert-hhdpgeorge
authored andcommitted
samd/mpconfigport: Enable a few more MicroPython features.
Additional features are: - Support executing .mpy files. - Allow const(). - Enable auto-indent in REPL. - Enable enumerate, min/max, attrtuple, input.
1 parent 4ef2da1 commit 009c51c

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

ports/samd/mpconfigport.h

+11-4
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,20 @@
3838
#define MICROPY_ALLOC_PATH_MAX (256)
3939
#define MICROPY_QSTR_BYTES_IN_HASH (1)
4040

41+
// MicroPython emitters
42+
#define MICROPY_PERSISTENT_CODE_LOAD (1)
43+
#define MICROPY_EMIT_THUMB (0)
44+
#define MICROPY_EMIT_INLINE_THUMB (0)
45+
4146
// Compiler configuration
42-
#define MICROPY_COMP_CONST (0)
47+
#define MICROPY_COMP_CONST (1)
4348

4449
// Python internal features
4550
#define MICROPY_ENABLE_GC (1)
4651
#define MICROPY_ENABLE_FINALISER (1)
4752
#define MICROPY_KBD_EXCEPTION (1)
4853
#define MICROPY_HELPER_REPL (1)
54+
#define MICROPY_REPL_AUTO_INDENT (1)
4955
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
5056
#define MICROPY_ENABLE_SOURCE_LINE (1)
5157
#define MICROPY_STREAMS_NON_BLOCK (1)
@@ -66,15 +72,16 @@
6672
#define MICROPY_PY_BUILTINS_SET (0)
6773
#define MICROPY_PY_BUILTINS_FROZENSET (0)
6874
#define MICROPY_PY_BUILTINS_PROPERTY (0)
69-
#define MICROPY_PY_BUILTINS_ENUMERATE (0)
75+
#define MICROPY_PY_BUILTINS_ENUMERATE (1)
7076
#define MICROPY_PY_BUILTINS_FILTER (0)
7177
#define MICROPY_PY_BUILTINS_REVERSED (0)
7278
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1)
73-
#define MICROPY_PY_BUILTINS_MIN_MAX (0)
79+
#define MICROPY_PY_BUILTINS_MIN_MAX (1)
80+
#define MICROPY_PY_BUILTINS_INPUT (1)
7481
#define MICROPY_PY___FILE__ (0)
7582
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
7683
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
77-
#define MICROPY_PY_ATTRTUPLE (0)
84+
#define MICROPY_PY_ATTRTUPLE (1)
7885
#define MICROPY_PY_COLLECTIONS (0)
7986
#define MICROPY_PY_SYS (1)
8087
#define MICROPY_PY_SYS_PLATFORM "samd"

0 commit comments

Comments
 (0)