qemu: Rename qemu-arm port to qemu.

Because this port now supports multiple architectures.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2024-09-04 17:06:25 +10:00
parent 3ea1ce63da
commit 659113825d
39 changed files with 23 additions and 27 deletions

View File

@ -1,4 +1,4 @@
name: qemu-arm port
name: qemu port
on:
push:
@ -11,7 +11,7 @@ on:
- 'shared/**'
- 'lib/**'
- 'drivers/**'
- 'ports/qemu-arm/**'
- 'ports/qemu/**'
- 'tests/**'
concurrency:

View File

@ -114,7 +114,7 @@ In addition, the following ports are provided in this repository:
- [nrf](ports/nrf) -- Nordic Semiconductor nRF51 and nRF52.
- [pic16bit](ports/pic16bit) -- Microchip PIC 16-bit.
- [powerpc](ports/powerpc) -- IBM PowerPC (including Microwatt)
- [qemu-arm](ports/qemu-arm) -- QEMU-based Arm emulated target (for testing)
- [qemu](ports/qemu) -- QEMU-based emulated target (for testing)
- [renesas-ra](ports/renesas-ra) -- Renesas RA family.
- [rp2](ports/rp2) -- Raspberry Pi RP2040 (including Pico and Pico W).
- [samd](ports/samd) -- Microchip (formerly Atmel) SAMD21 and SAMD51.

View File

@ -166,7 +166,7 @@ run: $(BUILD)/firmware.elf
.PHONY: test
test: $(BUILD)/firmware.elf
$(eval DIRNAME=ports/$(notdir $(CURDIR)))
cd $(TOP)/tests && ./run-tests.py --target qemu-arm --device execpty:"$(QEMU_SYSTEM) $(QEMU_ARGS) -serial pty -kernel ../$(DIRNAME)/$<" $(RUN_TESTS_ARGS) $(RUN_TESTS_EXTRA)
cd $(TOP)/tests && ./run-tests.py --target qemu --device execpty:"$(QEMU_SYSTEM) $(QEMU_ARGS) -serial pty -kernel ../$(DIRNAME)/$<" $(RUN_TESTS_ARGS) $(RUN_TESTS_EXTRA)
$(BUILD)/firmware.elf: $(LDSCRIPT) $(OBJ)
$(Q)$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)

View File

@ -1,5 +1,5 @@
MicroPython port to qemu-arm
============================
MicroPython port to qemu
========================
This is experimental, community-supported port for Cortex-M and RISC-V RV32IMC
emulation as provided by QEMU (http://qemu.org).
@ -95,7 +95,7 @@ Or manually by first starting the emulation with `make run` and then running the
tests against the serial device, for example:
$ cd ../../tests
$ ./run-tests.py --target qemu-arm --device /dev/pts/1
$ ./run-tests.py --target qemu --device /dev/pts/1
Extra make options
------------------

View File

@ -11,4 +11,4 @@ SRC_BOARD_O += shared/runtime/gchelper_native.o shared/runtime/gchelper_rv32i.o
MPY_CROSS_FLAGS += -march=rv32imc
# These Thumb tests don't run on RV32, so exclude them.
RUN_TESTS_ARGS = --exclude 'inlineasm|qemu-arm/asm_test'
RUN_TESTS_ARGS = --exclude 'inlineasm|qemu/asm_test'

View File

@ -49,17 +49,13 @@
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
#define MICROPY_WARNINGS (1)
#define MICROPY_PY_IO_IOBASE (0)
#if defined(__ARM_ARCH)
#define MICROPY_PY_SYS_PLATFORM "qemu-arm"
#elif defined(__riscv)
#define MICROPY_PY_SYS_PLATFORM "qemu-riscv32"
#endif
#define MICROPY_PY_SYS_PLATFORM "qemu"
#define MICROPY_PY_SYS_STDIO_BUFFER (0)
#define MICROPY_PY_SELECT (0)
#define MICROPY_PY_TIME (0)
#define MICROPY_PY_ASYNCIO (0)
#define MICROPY_PY_MACHINE (1)
#define MICROPY_PY_MACHINE_INCLUDEFILE "ports/qemu-arm/modmachine.c"
#define MICROPY_PY_MACHINE_INCLUDEFILE "ports/qemu/modmachine.c"
#define MICROPY_PY_MACHINE_RESET (1)
#define MICROPY_PY_MACHINE_PIN_BASE (1)
#define MICROPY_VFS (1)

View File

@ -3,6 +3,6 @@
# Check that powers of 10 (that fit in float32) format correctly.
for i in range(31):
# It works to 12 digits on all platforms *except* qemu-arm, where
# It works to 12 digits on all platforms *except* qemu, where
# 10^11 comes out as 10000000820 or something.
print(i, "{:.7g}".format(float("1e" + str(i))))

View File

@ -675,7 +675,7 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
skip_tests.add(
"extmod/time_time_ns.py"
) # RA fsp rtc function doesn't support nano sec info
elif args.target == "qemu-arm":
elif args.target == "qemu":
skip_tests.add("inlineasm/asmfpaddsub.py") # requires Cortex-M4
skip_tests.add("inlineasm/asmfpcmp.py")
skip_tests.add("inlineasm/asmfpldrstr.py")
@ -1054,7 +1054,7 @@ the last matching regex is used:
"esp32",
"minimal",
"nrf",
"qemu-arm",
"qemu",
"renesas-ra",
"rp2",
)
@ -1131,11 +1131,11 @@ the last matching regex is used:
"cmdline",
"ports/unix",
)
elif args.target == "qemu-arm":
elif args.target == "qemu":
test_dirs += (
"float",
"inlineasm",
"ports/qemu-arm",
"ports/qemu",
)
elif args.target == "webassembly":
test_dirs += ("float", "ports/webassembly")

View File

@ -244,7 +244,7 @@ function ci_powerpc_build {
}
########################################################################################
# ports/qemu-arm
# ports/qemu
function ci_qemu_setup_arm {
ci_gcc_arm_setup
@ -262,17 +262,17 @@ function ci_qemu_setup_rv32 {
function ci_qemu_build_arm {
make ${MAKEOPTS} -C mpy-cross
make ${MAKEOPTS} -C ports/qemu-arm submodules
make ${MAKEOPTS} -C ports/qemu-arm CFLAGS_EXTRA=-DMP_ENDIANNESS_BIG=1
make ${MAKEOPTS} -C ports/qemu-arm clean
make ${MAKEOPTS} -C ports/qemu-arm test
make ${MAKEOPTS} -C ports/qemu-arm BOARD=SABRELITE test
make ${MAKEOPTS} -C ports/qemu submodules
make ${MAKEOPTS} -C ports/qemu CFLAGS_EXTRA=-DMP_ENDIANNESS_BIG=1
make ${MAKEOPTS} -C ports/qemu clean
make ${MAKEOPTS} -C ports/qemu test
make ${MAKEOPTS} -C ports/qemu BOARD=SABRELITE test
}
function ci_qemu_build_rv32 {
make ${MAKEOPTS} -C mpy-cross
make ${MAKEOPTS} -C ports/qemu-arm BOARD=VIRT_RV32 submodules
make ${MAKEOPTS} -C ports/qemu-arm BOARD=VIRT_RV32 test
make ${MAKEOPTS} -C ports/qemu BOARD=VIRT_RV32 submodules
make ${MAKEOPTS} -C ports/qemu BOARD=VIRT_RV32 test
}
########################################################################################