Skip to content

Commit ca485d2

Browse files
committed
codal_port/mpconfigport.h: Enable @micropython.asm_thumb emitter.
To match micro:bit v1. Signed-off-by: Damien George <damien@micropython.org>
1 parent c57910c commit ca485d2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/codal_port/mpconfigport.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
// Memory allocation policy
3535
#define MICROPY_ALLOC_PATH_MAX (PATH_MAX)
3636

37+
// MicroPython emitters
38+
#define MICROPY_EMIT_INLINE_THUMB (1)
39+
3740
// Python internal features
3841
#define MICROPY_VM_HOOK_COUNT (64)
3942
#define MICROPY_VM_HOOK_INIT \
@@ -138,6 +141,8 @@ static inline void enable_irq(uint32_t state) {
138141
#define MICROPY_BEGIN_ATOMIC_SECTION() disable_irq()
139142
#define MICROPY_END_ATOMIC_SECTION(state) enable_irq(state)
140143

144+
#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((uint32_t)(p) | 1))
145+
141146
#define MP_SSIZE_MAX (0x7fffffff)
142147

143148
// Type definitions for the specific machine

0 commit comments

Comments
 (0)