summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-09-04 17:06:25 +1000
committerDamien George <damien@micropython.org>2024-09-06 11:08:39 +1000
commit659113825d10bf2ae71dd215a8597451e505982d (patch)
tree63b93e24621ab85d01bf7f627839077f524b4cb7
parent3ea1ce63da9bd17c7d395682387e58b4a7759167 (diff)
qemu: Rename qemu-arm port to qemu.
Because this port now supports multiple architectures. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--.github/workflows/ports_qemu.yml (renamed from .github/workflows/ports_qemu-arm.yml)4
-rw-r--r--README.md2
-rw-r--r--ports/qemu/Makefile (renamed from ports/qemu-arm/Makefile)2
-rw-r--r--ports/qemu/README.md (renamed from ports/qemu-arm/README.md)6
-rw-r--r--ports/qemu/boards/MICROBIT.mk (renamed from ports/qemu-arm/boards/MICROBIT.mk)0
-rw-r--r--ports/qemu/boards/MPS2_AN385.mk (renamed from ports/qemu-arm/boards/MPS2_AN385.mk)0
-rw-r--r--ports/qemu/boards/NETDUINO2.mk (renamed from ports/qemu-arm/boards/NETDUINO2.mk)0
-rw-r--r--ports/qemu/boards/SABRELITE.mk (renamed from ports/qemu-arm/boards/SABRELITE.mk)0
-rw-r--r--ports/qemu/boards/VIRT_RV32.mk (renamed from ports/qemu-arm/boards/VIRT_RV32.mk)2
-rw-r--r--ports/qemu/main.c (renamed from ports/qemu-arm/main.c)0
-rw-r--r--ports/qemu/mcu/arm/imx6.ld (renamed from ports/qemu-arm/mcu/arm/imx6.ld)0
-rw-r--r--ports/qemu/mcu/arm/mps2.ld (renamed from ports/qemu-arm/mcu/arm/mps2.ld)0
-rw-r--r--ports/qemu/mcu/arm/nrf51.ld (renamed from ports/qemu-arm/mcu/arm/nrf51.ld)0
-rw-r--r--ports/qemu/mcu/arm/startup.c (renamed from ports/qemu-arm/mcu/arm/startup.c)0
-rw-r--r--ports/qemu/mcu/arm/stm32.ld (renamed from ports/qemu-arm/mcu/arm/stm32.ld)0
-rw-r--r--ports/qemu/mcu/rv32/entrypoint.s (renamed from ports/qemu-arm/mcu/rv32/entrypoint.s)0
-rw-r--r--ports/qemu/mcu/rv32/interrupts.c (renamed from ports/qemu-arm/mcu/rv32/interrupts.c)0
-rw-r--r--ports/qemu/mcu/rv32/startup.c (renamed from ports/qemu-arm/mcu/rv32/startup.c)0
-rw-r--r--ports/qemu/mcu/rv32/virt.ld (renamed from ports/qemu-arm/mcu/rv32/virt.ld)0
-rw-r--r--ports/qemu/modmachine.c (renamed from ports/qemu-arm/modmachine.c)0
-rw-r--r--ports/qemu/mpconfigport.h (renamed from ports/qemu-arm/mpconfigport.h)8
-rw-r--r--ports/qemu/mphalport.c (renamed from ports/qemu-arm/mphalport.c)0
-rw-r--r--ports/qemu/mphalport.h (renamed from ports/qemu-arm/mphalport.h)0
-rw-r--r--ports/qemu/qstrdefsport.h (renamed from ports/qemu-arm/qstrdefsport.h)0
-rw-r--r--ports/qemu/test-frzmpy/frozen_asm.py (renamed from ports/qemu-arm/test-frzmpy/frozen_asm.py)0
-rw-r--r--ports/qemu/test-frzmpy/frozen_const.py (renamed from ports/qemu-arm/test-frzmpy/frozen_const.py)0
-rw-r--r--ports/qemu/test-frzmpy/frozen_viper.py (renamed from ports/qemu-arm/test-frzmpy/frozen_viper.py)0
-rw-r--r--ports/qemu/test-frzmpy/native_frozen_align.py (renamed from ports/qemu-arm/test-frzmpy/native_frozen_align.py)0
-rw-r--r--ports/qemu/uart.c (renamed from ports/qemu-arm/uart.c)0
-rw-r--r--ports/qemu/uart.h (renamed from ports/qemu-arm/uart.h)0
-rw-r--r--tests/float/float_format_ints_power10.py2
-rw-r--r--tests/ports/qemu/asm_test.py (renamed from tests/ports/qemu-arm/asm_test.py)0
-rw-r--r--tests/ports/qemu/asm_test.py.exp (renamed from tests/ports/qemu-arm/asm_test.py.exp)0
-rw-r--r--tests/ports/qemu/native_test.py (renamed from tests/ports/qemu-arm/native_test.py)0
-rw-r--r--tests/ports/qemu/native_test.py.exp (renamed from tests/ports/qemu-arm/native_test.py.exp)0
-rw-r--r--tests/ports/qemu/viper_test.py (renamed from tests/ports/qemu-arm/viper_test.py)0
-rw-r--r--tests/ports/qemu/viper_test.py.exp (renamed from tests/ports/qemu-arm/viper_test.py.exp)0
-rwxr-xr-xtests/run-tests.py8
-rwxr-xr-xtools/ci.sh16
39 files changed, 23 insertions, 27 deletions
diff --git a/.github/workflows/ports_qemu-arm.yml b/.github/workflows/ports_qemu.yml
index 147d1b4b9..57192c439 100644
--- a/.github/workflows/ports_qemu-arm.yml
+++ b/.github/workflows/ports_qemu.yml
@@ -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:
diff --git a/README.md b/README.md
index a4086c68a..c71fa4b1d 100644
--- a/README.md
+++ b/README.md
@@ -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.
diff --git a/ports/qemu-arm/Makefile b/ports/qemu/Makefile
index 605b6b572..4d73c025d 100644
--- a/ports/qemu-arm/Makefile
+++ b/ports/qemu/Makefile
@@ -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)
diff --git a/ports/qemu-arm/README.md b/ports/qemu/README.md
index 2e543e77e..d9108311b 100644
--- a/ports/qemu-arm/README.md
+++ b/ports/qemu/README.md
@@ -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
------------------
diff --git a/ports/qemu-arm/boards/MICROBIT.mk b/ports/qemu/boards/MICROBIT.mk
index 02eb0576c..02eb0576c 100644
--- a/ports/qemu-arm/boards/MICROBIT.mk
+++ b/ports/qemu/boards/MICROBIT.mk
diff --git a/ports/qemu-arm/boards/MPS2_AN385.mk b/ports/qemu/boards/MPS2_AN385.mk
index 182d076eb..182d076eb 100644
--- a/ports/qemu-arm/boards/MPS2_AN385.mk
+++ b/ports/qemu/boards/MPS2_AN385.mk
diff --git a/ports/qemu-arm/boards/NETDUINO2.mk b/ports/qemu/boards/NETDUINO2.mk
index ffa781f33..ffa781f33 100644
--- a/ports/qemu-arm/boards/NETDUINO2.mk
+++ b/ports/qemu/boards/NETDUINO2.mk
diff --git a/ports/qemu-arm/boards/SABRELITE.mk b/ports/qemu/boards/SABRELITE.mk
index f1945c10f..f1945c10f 100644
--- a/ports/qemu-arm/boards/SABRELITE.mk
+++ b/ports/qemu/boards/SABRELITE.mk
diff --git a/ports/qemu-arm/boards/VIRT_RV32.mk b/ports/qemu/boards/VIRT_RV32.mk
index ec3535eed..a61b659fa 100644
--- a/ports/qemu-arm/boards/VIRT_RV32.mk
+++ b/ports/qemu/boards/VIRT_RV32.mk
@@ -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'
diff --git a/ports/qemu-arm/main.c b/ports/qemu/main.c
index 042106580..042106580 100644
--- a/ports/qemu-arm/main.c
+++ b/ports/qemu/main.c
diff --git a/ports/qemu-arm/mcu/arm/imx6.ld b/ports/qemu/mcu/arm/imx6.ld
index c6d8e0818..c6d8e0818 100644
--- a/ports/qemu-arm/mcu/arm/imx6.ld
+++ b/ports/qemu/mcu/arm/imx6.ld
diff --git a/ports/qemu-arm/mcu/arm/mps2.ld b/ports/qemu/mcu/arm/mps2.ld
index dffefa3b0..dffefa3b0 100644
--- a/ports/qemu-arm/mcu/arm/mps2.ld
+++ b/ports/qemu/mcu/arm/mps2.ld
diff --git a/ports/qemu-arm/mcu/arm/nrf51.ld b/ports/qemu/mcu/arm/nrf51.ld
index 46d7201b3..46d7201b3 100644
--- a/ports/qemu-arm/mcu/arm/nrf51.ld
+++ b/ports/qemu/mcu/arm/nrf51.ld
diff --git a/ports/qemu-arm/mcu/arm/startup.c b/ports/qemu/mcu/arm/startup.c
index 118a5b800..118a5b800 100644
--- a/ports/qemu-arm/mcu/arm/startup.c
+++ b/ports/qemu/mcu/arm/startup.c
diff --git a/ports/qemu-arm/mcu/arm/stm32.ld b/ports/qemu/mcu/arm/stm32.ld
index 835f9bbe9..835f9bbe9 100644
--- a/ports/qemu-arm/mcu/arm/stm32.ld
+++ b/ports/qemu/mcu/arm/stm32.ld
diff --git a/ports/qemu-arm/mcu/rv32/entrypoint.s b/ports/qemu/mcu/rv32/entrypoint.s
index 9144c0c48..9144c0c48 100644
--- a/ports/qemu-arm/mcu/rv32/entrypoint.s
+++ b/ports/qemu/mcu/rv32/entrypoint.s
diff --git a/ports/qemu-arm/mcu/rv32/interrupts.c b/ports/qemu/mcu/rv32/interrupts.c
index ccb4644f9..ccb4644f9 100644
--- a/ports/qemu-arm/mcu/rv32/interrupts.c
+++ b/ports/qemu/mcu/rv32/interrupts.c
diff --git a/ports/qemu-arm/mcu/rv32/startup.c b/ports/qemu/mcu/rv32/startup.c
index 298bd605e..298bd605e 100644
--- a/ports/qemu-arm/mcu/rv32/startup.c
+++ b/ports/qemu/mcu/rv32/startup.c
diff --git a/ports/qemu-arm/mcu/rv32/virt.ld b/ports/qemu/mcu/rv32/virt.ld
index 64675ad4e..64675ad4e 100644
--- a/ports/qemu-arm/mcu/rv32/virt.ld
+++ b/ports/qemu/mcu/rv32/virt.ld
diff --git a/ports/qemu-arm/modmachine.c b/ports/qemu/modmachine.c
index 75872a22c..75872a22c 100644
--- a/ports/qemu-arm/modmachine.c
+++ b/ports/qemu/modmachine.c
diff --git a/ports/qemu-arm/mpconfigport.h b/ports/qemu/mpconfigport.h
index fe12fa578..f3dd8c375 100644
--- a/ports/qemu-arm/mpconfigport.h
+++ b/ports/qemu/mpconfigport.h
@@ -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)
diff --git a/ports/qemu-arm/mphalport.c b/ports/qemu/mphalport.c
index dbb87b48b..dbb87b48b 100644
--- a/ports/qemu-arm/mphalport.c
+++ b/ports/qemu/mphalport.c
diff --git a/ports/qemu-arm/mphalport.h b/ports/qemu/mphalport.h
index 935510749..935510749 100644
--- a/ports/qemu-arm/mphalport.h
+++ b/ports/qemu/mphalport.h
diff --git a/ports/qemu-arm/qstrdefsport.h b/ports/qemu/qstrdefsport.h
index 00d3e2ae3..00d3e2ae3 100644
--- a/ports/qemu-arm/qstrdefsport.h
+++ b/ports/qemu/qstrdefsport.h
diff --git a/ports/qemu-arm/test-frzmpy/frozen_asm.py b/ports/qemu/test-frzmpy/frozen_asm.py
index ba43264b3..ba43264b3 100644
--- a/ports/qemu-arm/test-frzmpy/frozen_asm.py
+++ b/ports/qemu/test-frzmpy/frozen_asm.py
diff --git a/ports/qemu-arm/test-frzmpy/frozen_const.py b/ports/qemu/test-frzmpy/frozen_const.py
index 19af4a3e2..19af4a3e2 100644
--- a/ports/qemu-arm/test-frzmpy/frozen_const.py
+++ b/ports/qemu/test-frzmpy/frozen_const.py
diff --git a/ports/qemu-arm/test-frzmpy/frozen_viper.py b/ports/qemu/test-frzmpy/frozen_viper.py
index 71dfe7c3b..71dfe7c3b 100644
--- a/ports/qemu-arm/test-frzmpy/frozen_viper.py
+++ b/ports/qemu/test-frzmpy/frozen_viper.py
diff --git a/ports/qemu-arm/test-frzmpy/native_frozen_align.py b/ports/qemu/test-frzmpy/native_frozen_align.py
index 8675b8e7f..8675b8e7f 100644
--- a/ports/qemu-arm/test-frzmpy/native_frozen_align.py
+++ b/ports/qemu/test-frzmpy/native_frozen_align.py
diff --git a/ports/qemu-arm/uart.c b/ports/qemu/uart.c
index fb9376d1f..fb9376d1f 100644
--- a/ports/qemu-arm/uart.c
+++ b/ports/qemu/uart.c
diff --git a/ports/qemu-arm/uart.h b/ports/qemu/uart.h
index 9c62a295d..9c62a295d 100644
--- a/ports/qemu-arm/uart.h
+++ b/ports/qemu/uart.h
diff --git a/tests/float/float_format_ints_power10.py b/tests/float/float_format_ints_power10.py
index 98900c135..7ea200f18 100644
--- a/tests/float/float_format_ints_power10.py
+++ b/tests/float/float_format_ints_power10.py
@@ -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))))
diff --git a/tests/ports/qemu-arm/asm_test.py b/tests/ports/qemu/asm_test.py
index 26c7efe42..26c7efe42 100644
--- a/tests/ports/qemu-arm/asm_test.py
+++ b/tests/ports/qemu/asm_test.py
diff --git a/tests/ports/qemu-arm/asm_test.py.exp b/tests/ports/qemu/asm_test.py.exp
index b4be8b40e..b4be8b40e 100644
--- a/tests/ports/qemu-arm/asm_test.py.exp
+++ b/tests/ports/qemu/asm_test.py.exp
diff --git a/tests/ports/qemu-arm/native_test.py b/tests/ports/qemu/native_test.py
index 0b58433d9..0b58433d9 100644
--- a/tests/ports/qemu-arm/native_test.py
+++ b/tests/ports/qemu/native_test.py
diff --git a/tests/ports/qemu-arm/native_test.py.exp b/tests/ports/qemu/native_test.py.exp
index dcf37cd5e..dcf37cd5e 100644
--- a/tests/ports/qemu-arm/native_test.py.exp
+++ b/tests/ports/qemu/native_test.py.exp
diff --git a/tests/ports/qemu-arm/viper_test.py b/tests/ports/qemu/viper_test.py
index 8e38a2b92..8e38a2b92 100644
--- a/tests/ports/qemu-arm/viper_test.py
+++ b/tests/ports/qemu/viper_test.py
diff --git a/tests/ports/qemu-arm/viper_test.py.exp b/tests/ports/qemu/viper_test.py.exp
index 00750edc0..00750edc0 100644
--- a/tests/ports/qemu-arm/viper_test.py.exp
+++ b/tests/ports/qemu/viper_test.py.exp
diff --git a/tests/run-tests.py b/tests/run-tests.py
index b80a78ed6..43a9e38d3 100755
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -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")
diff --git a/tools/ci.sh b/tools/ci.sh
index 70fdb487e..46aee1a3a 100755
--- a/tools/ci.sh
+++ b/tools/ci.sh
@@ -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
}
########################################################################################