Browse Source

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>
pull/15803/head
Alessandro Gatti 2 months ago
parent
commit
60f33a8bb6
  1. 4
      ports/qemu/Makefile
  2. 2
      ports/qemu/mpconfigport.h

4
ports/qemu/Makefile

@ -19,8 +19,12 @@ QSTR_DEFS = qstrdefsport.h
MICROPY_ROM_TEXT_COMPRESSION ?= 1
ifeq ($(QEMU_ARCH),arm)
ifeq ($(BOARD),MICROBIT)
FROZEN_MANIFEST ?= "freeze('test-frzmpy', ('frozen_const.py'))"
else
FROZEN_MANIFEST ?= "freeze('test-frzmpy')"
endif
endif
ifeq ($(QEMU_ARCH),riscv32)
FROZEN_MANIFEST ?= "freeze('test-frzmpy', ('frozen_const.py', 'frozen_viper.py', 'native_frozen_align.py'))"
endif

2
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)

Loading…
Cancel
Save