Skip to content

Commit 8f45f5e

Browse files
mzdanieldpgeorge
authored andcommitted
nrf: Set .mpy features consistent with documentation and other ports.
This allows nrf devices to load .mpy files. And nrf52840 and nrf9160 based boards also support compiling and loading native code.
1 parent d7fbc75 commit 8f45f5e

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

ports/nrf/mpconfigdevice_nrf52840.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@
3434
#define MICROPY_VFS (1)
3535
#endif
3636

37+
// Board overridable emitter configuration.
38+
39+
#ifndef MICROPY_EMIT_THUMB
40+
#define MICROPY_EMIT_THUMB (1)
41+
#endif
42+
43+
#ifndef MICROPY_EMIT_INLINE_THUMB
44+
#define MICROPY_EMIT_INLINE_THUMB (1)
45+
#endif
46+
3747
// Board overridable feature configuration.
3848

3949
#ifndef MICROPY_ENABLE_SOURCE_LINE

ports/nrf/mpconfigdevice_nrf9160.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@
3434
#define MICROPY_VFS (1)
3535
#endif
3636

37+
// Board overridable emitter configuration.
38+
39+
#ifndef MICROPY_EMIT_THUMB
40+
#define MICROPY_EMIT_THUMB (1)
41+
#endif
42+
43+
#ifndef MICROPY_EMIT_INLINE_THUMB
44+
#define MICROPY_EMIT_INLINE_THUMB (1)
45+
#endif
46+
3747
// Board overridable feature configuration.
3848

3949
#ifndef MICROPY_ENABLE_SOURCE_LINE

ports/nrf/mpconfigport.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#define MICROPY_VFS (0)
4444
#endif
4545
#define MICROPY_ALLOC_PATH_MAX (512)
46-
#define MICROPY_PERSISTENT_CODE_LOAD (0)
46+
#define MICROPY_PERSISTENT_CODE_LOAD (1)
4747
#define MICROPY_COMP_MODULE_CONST (0)
4848
#define MICROPY_COMP_TRIPLE_TUPLE_ASSIGN (0)
4949
#define MICROPY_READER_VFS (MICROPY_VFS)
@@ -103,7 +103,7 @@
103103
#define MICROPY_CAN_OVERRIDE_BUILTINS (1)
104104
#define MICROPY_USE_INTERNAL_ERRNO (1)
105105
#define MICROPY_PY_FUNCTION_ATTRS (1)
106-
#define MICROPY_PY_BUILTINS_STR_UNICODE (0)
106+
#define MICROPY_PY_BUILTINS_STR_UNICODE (1)
107107
#define MICROPY_PY_BUILTINS_STR_CENTER (0)
108108
#define MICROPY_PY_BUILTINS_STR_PARTITION (0)
109109
#define MICROPY_PY_BUILTINS_STR_SPLITLINES (0)

0 commit comments

Comments
 (0)