diff options
| author | Alessandro Gatti <a.gatti@frob.it> | 2024-09-06 20:32:04 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-01-16 12:11:09 +1100 |
| commit | 3225c1bc66a3cf21c3fc48917123c24131bdbf8b (patch) | |
| tree | 6c68bde13328aa611d1fbbb28bb647196dbb4a24 | |
| parent | 1232a83555968e04ec8e2ceb0d49435aa18de9f0 (diff) | |
qemu: 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>
| -rw-r--r-- | ports/qemu/Makefile | 4 | ||||
| -rw-r--r-- | ports/qemu/mpconfigport.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ports/qemu/Makefile b/ports/qemu/Makefile index f555ca50d..1b77b1790 100644 --- a/ports/qemu/Makefile +++ b/ports/qemu/Makefile @@ -20,8 +20,12 @@ MICROPY_ROM_TEXT_COMPRESSION ?= 1 ifeq ($(QEMU_ARCH),arm) MICROPY_HEAP_SIZE ?= 122880 +ifeq ($(BOARD),MICROBIT) +FROZEN_MANIFEST ?= "require('unittest'); freeze('test-frzmpy', ('frozen_const.py'))" +else FROZEN_MANIFEST ?= "require('unittest'); freeze('test-frzmpy', ('frozen_asm_thumb.py', 'frozen_const.py', 'frozen_viper.py', 'native_frozen_align.py'))" endif +endif ifeq ($(QEMU_ARCH),riscv32) MICROPY_HEAP_SIZE ?= 122880 FROZEN_MANIFEST ?= "require('unittest'); freeze('test-frzmpy', ('frozen_asm_rv32.py', 'frozen_const.py', 'frozen_viper.py', 'native_frozen_align.py'))" diff --git a/ports/qemu/mpconfigport.h b/ports/qemu/mpconfigport.h index 8f55d284f..0a25df4d0 100644 --- a/ports/qemu/mpconfigport.h +++ b/ports/qemu/mpconfigport.h @@ -34,8 +34,10 @@ #define MICROPY_EMIT_ARM (1) #define MICROPY_EMIT_INLINE_THUMB (1) #elif defined(__ARM_ARCH_ISA_THUMB) +#if !defined(QEMU_SOC_NRF51) #define MICROPY_EMIT_THUMB (1) #define MICROPY_EMIT_INLINE_THUMB (1) +#endif #define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p) | 1)) #elif defined(__riscv) #define MICROPY_EMIT_RV32 (1) |
