Skip to content

Commit 7dd1535

Browse files
committed
qemu/arm: Disable native emitter for the MICROBIT board.
The Micro Bit machine definition in Qemu has soft MMU support enabled, which is currently not compatible with the way MicroPython generates code that needs to call back into non-emitted code. As a stop-gap solution, the native code emitter for the MICROBIT board is turned off. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
1 parent 312b8cd commit 7dd1535

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

ports/qemu/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ QSTR_DEFS = qstrdefsport.h
1919
MICROPY_ROM_TEXT_COMPRESSION ?= 1
2020

2121
ifeq ($(QEMU_ARCH),arm)
22+
ifeq ($(BOARD),MICROBIT)
23+
FROZEN_MANIFEST ?= "freeze('test-frzmpy', ('frozen_const.py'))"
24+
else
2225
FROZEN_MANIFEST ?= "freeze('test-frzmpy')"
2326
endif
27+
endif
2428
ifeq ($(QEMU_ARCH),riscv32)
2529
FROZEN_MANIFEST ?= "freeze('test-frzmpy', ('frozen_const.py', 'frozen_viper.py', 'native_frozen_align.py'))"
2630
endif

ports/qemu/mpconfigport.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@
3434
#define MICROPY_EMIT_ARM (1)
3535
#define MICROPY_EMIT_INLINE_THUMB (1)
3636
#elif defined(__ARM_ARCH_ISA_THUMB)
37+
#if !defined(QEMU_SOC_NRF51)
3738
#define MICROPY_EMIT_THUMB (1)
3839
#define MICROPY_EMIT_INLINE_THUMB (1)
40+
#endif
3941
#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p) | 1))
4042
#elif defined(__riscv)
4143
#define MICROPY_EMIT_RV32 (1)

0 commit comments

Comments
 (0)