Skip to content

Commit 6591138

Browse files
committed
qemu: Rename qemu-arm port to qemu.
Because this port now supports multiple architectures. Signed-off-by: Damien George <damien@micropython.org>
1 parent 3ea1ce6 commit 6591138

39 files changed

+23
-27
lines changed

.github/workflows/ports_qemu-arm.yml .github/workflows/ports_qemu.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: qemu-arm port
1+
name: qemu port
22

33
on:
44
push:
@@ -11,7 +11,7 @@ on:
1111
- 'shared/**'
1212
- 'lib/**'
1313
- 'drivers/**'
14-
- 'ports/qemu-arm/**'
14+
- 'ports/qemu/**'
1515
- 'tests/**'
1616

1717
concurrency:

README.md

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

ports/qemu-arm/Makefile ports/qemu/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ run: $(BUILD)/firmware.elf
166166
.PHONY: test
167167
test: $(BUILD)/firmware.elf
168168
$(eval DIRNAME=ports/$(notdir $(CURDIR)))
169-
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)
169+
cd $(TOP)/tests && ./run-tests.py --target qemu --device execpty:"$(QEMU_SYSTEM) $(QEMU_ARGS) -serial pty -kernel ../$(DIRNAME)/$<" $(RUN_TESTS_ARGS) $(RUN_TESTS_EXTRA)
170170

171171
$(BUILD)/firmware.elf: $(LDSCRIPT) $(OBJ)
172172
$(Q)$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)

ports/qemu-arm/README.md ports/qemu/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
MicroPython port to qemu-arm
2-
============================
1+
MicroPython port to qemu
2+
========================
33

44
This is experimental, community-supported port for Cortex-M and RISC-V RV32IMC
55
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
9595
tests against the serial device, for example:
9696

9797
$ cd ../../tests
98-
$ ./run-tests.py --target qemu-arm --device /dev/pts/1
98+
$ ./run-tests.py --target qemu --device /dev/pts/1
9999

100100
Extra make options
101101
------------------
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

ports/qemu-arm/boards/VIRT_RV32.mk ports/qemu/boards/VIRT_RV32.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ SRC_BOARD_O += shared/runtime/gchelper_native.o shared/runtime/gchelper_rv32i.o
1111
MPY_CROSS_FLAGS += -march=rv32imc
1212

1313
# These Thumb tests don't run on RV32, so exclude them.
14-
RUN_TESTS_ARGS = --exclude 'inlineasm|qemu-arm/asm_test'
14+
RUN_TESTS_ARGS = --exclude 'inlineasm|qemu/asm_test'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

ports/qemu-arm/mpconfigport.h ports/qemu/mpconfigport.h

+2-6
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,13 @@
4949
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
5050
#define MICROPY_WARNINGS (1)
5151
#define MICROPY_PY_IO_IOBASE (0)
52-
#if defined(__ARM_ARCH)
53-
#define MICROPY_PY_SYS_PLATFORM "qemu-arm"
54-
#elif defined(__riscv)
55-
#define MICROPY_PY_SYS_PLATFORM "qemu-riscv32"
56-
#endif
52+
#define MICROPY_PY_SYS_PLATFORM "qemu"
5753
#define MICROPY_PY_SYS_STDIO_BUFFER (0)
5854
#define MICROPY_PY_SELECT (0)
5955
#define MICROPY_PY_TIME (0)
6056
#define MICROPY_PY_ASYNCIO (0)
6157
#define MICROPY_PY_MACHINE (1)
62-
#define MICROPY_PY_MACHINE_INCLUDEFILE "ports/qemu-arm/modmachine.c"
58+
#define MICROPY_PY_MACHINE_INCLUDEFILE "ports/qemu/modmachine.c"
6359
#define MICROPY_PY_MACHINE_RESET (1)
6460
#define MICROPY_PY_MACHINE_PIN_BASE (1)
6561
#define MICROPY_VFS (1)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tests/float/float_format_ints_power10.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

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

tests/run-tests.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
675675
skip_tests.add(
676676
"extmod/time_time_ns.py"
677677
) # RA fsp rtc function doesn't support nano sec info
678-
elif args.target == "qemu-arm":
678+
elif args.target == "qemu":
679679
skip_tests.add("inlineasm/asmfpaddsub.py") # requires Cortex-M4
680680
skip_tests.add("inlineasm/asmfpcmp.py")
681681
skip_tests.add("inlineasm/asmfpldrstr.py")
@@ -1054,7 +1054,7 @@ def main():
10541054
"esp32",
10551055
"minimal",
10561056
"nrf",
1057-
"qemu-arm",
1057+
"qemu",
10581058
"renesas-ra",
10591059
"rp2",
10601060
)
@@ -1131,11 +1131,11 @@ def main():
11311131
"cmdline",
11321132
"ports/unix",
11331133
)
1134-
elif args.target == "qemu-arm":
1134+
elif args.target == "qemu":
11351135
test_dirs += (
11361136
"float",
11371137
"inlineasm",
1138-
"ports/qemu-arm",
1138+
"ports/qemu",
11391139
)
11401140
elif args.target == "webassembly":
11411141
test_dirs += ("float", "ports/webassembly")

tools/ci.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ function ci_powerpc_build {
244244
}
245245

246246
########################################################################################
247-
# ports/qemu-arm
247+
# ports/qemu
248248

249249
function ci_qemu_setup_arm {
250250
ci_gcc_arm_setup
@@ -262,17 +262,17 @@ function ci_qemu_setup_rv32 {
262262

263263
function ci_qemu_build_arm {
264264
make ${MAKEOPTS} -C mpy-cross
265-
make ${MAKEOPTS} -C ports/qemu-arm submodules
266-
make ${MAKEOPTS} -C ports/qemu-arm CFLAGS_EXTRA=-DMP_ENDIANNESS_BIG=1
267-
make ${MAKEOPTS} -C ports/qemu-arm clean
268-
make ${MAKEOPTS} -C ports/qemu-arm test
269-
make ${MAKEOPTS} -C ports/qemu-arm BOARD=SABRELITE test
265+
make ${MAKEOPTS} -C ports/qemu submodules
266+
make ${MAKEOPTS} -C ports/qemu CFLAGS_EXTRA=-DMP_ENDIANNESS_BIG=1
267+
make ${MAKEOPTS} -C ports/qemu clean
268+
make ${MAKEOPTS} -C ports/qemu test
269+
make ${MAKEOPTS} -C ports/qemu BOARD=SABRELITE test
270270
}
271271

272272
function ci_qemu_build_rv32 {
273273
make ${MAKEOPTS} -C mpy-cross
274-
make ${MAKEOPTS} -C ports/qemu-arm BOARD=VIRT_RV32 submodules
275-
make ${MAKEOPTS} -C ports/qemu-arm BOARD=VIRT_RV32 test
274+
make ${MAKEOPTS} -C ports/qemu BOARD=VIRT_RV32 submodules
275+
make ${MAKEOPTS} -C ports/qemu BOARD=VIRT_RV32 test
276276
}
277277

278278
########################################################################################

0 commit comments

Comments
 (0)