Browse Source

qemu: Rename qemu-arm port to qemu.

Because this port now supports multiple architectures.

Signed-off-by: Damien George <damien@micropython.org>
pull/15784/head
Damien George 2 months ago
parent
commit
659113825d
  1. 4
      .github/workflows/ports_qemu.yml
  2. 2
      README.md
  3. 2
      ports/qemu/Makefile
  4. 6
      ports/qemu/README.md
  5. 0
      ports/qemu/boards/MICROBIT.mk
  6. 0
      ports/qemu/boards/MPS2_AN385.mk
  7. 0
      ports/qemu/boards/NETDUINO2.mk
  8. 0
      ports/qemu/boards/SABRELITE.mk
  9. 2
      ports/qemu/boards/VIRT_RV32.mk
  10. 0
      ports/qemu/main.c
  11. 0
      ports/qemu/mcu/arm/imx6.ld
  12. 0
      ports/qemu/mcu/arm/mps2.ld
  13. 0
      ports/qemu/mcu/arm/nrf51.ld
  14. 0
      ports/qemu/mcu/arm/startup.c
  15. 0
      ports/qemu/mcu/arm/stm32.ld
  16. 0
      ports/qemu/mcu/rv32/entrypoint.s
  17. 0
      ports/qemu/mcu/rv32/interrupts.c
  18. 0
      ports/qemu/mcu/rv32/startup.c
  19. 0
      ports/qemu/mcu/rv32/virt.ld
  20. 0
      ports/qemu/modmachine.c
  21. 8
      ports/qemu/mpconfigport.h
  22. 0
      ports/qemu/mphalport.c
  23. 0
      ports/qemu/mphalport.h
  24. 0
      ports/qemu/qstrdefsport.h
  25. 0
      ports/qemu/test-frzmpy/frozen_asm.py
  26. 0
      ports/qemu/test-frzmpy/frozen_const.py
  27. 0
      ports/qemu/test-frzmpy/frozen_viper.py
  28. 0
      ports/qemu/test-frzmpy/native_frozen_align.py
  29. 0
      ports/qemu/uart.c
  30. 0
      ports/qemu/uart.h
  31. 2
      tests/float/float_format_ints_power10.py
  32. 0
      tests/ports/qemu/asm_test.py
  33. 0
      tests/ports/qemu/asm_test.py.exp
  34. 0
      tests/ports/qemu/native_test.py
  35. 0
      tests/ports/qemu/native_test.py.exp
  36. 0
      tests/ports/qemu/viper_test.py
  37. 0
      tests/ports/qemu/viper_test.py.exp
  38. 8
      tests/run-tests.py
  39. 16
      tools/ci.sh

4
.github/workflows/ports_qemu-arm.yml → .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:

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

2
ports/qemu-arm/Makefile → 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)

6
ports/qemu-arm/README.md → 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
------------------

0
ports/qemu-arm/boards/MICROBIT.mk → ports/qemu/boards/MICROBIT.mk

0
ports/qemu-arm/boards/MPS2_AN385.mk → ports/qemu/boards/MPS2_AN385.mk

0
ports/qemu-arm/boards/NETDUINO2.mk → ports/qemu/boards/NETDUINO2.mk

0
ports/qemu-arm/boards/SABRELITE.mk → ports/qemu/boards/SABRELITE.mk

2
ports/qemu-arm/boards/VIRT_RV32.mk → 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'

0
ports/qemu-arm/main.c → ports/qemu/main.c

0
ports/qemu-arm/mcu/arm/imx6.ld → ports/qemu/mcu/arm/imx6.ld

0
ports/qemu-arm/mcu/arm/mps2.ld → ports/qemu/mcu/arm/mps2.ld

0
ports/qemu-arm/mcu/arm/nrf51.ld → ports/qemu/mcu/arm/nrf51.ld

0
ports/qemu-arm/mcu/arm/startup.c → ports/qemu/mcu/arm/startup.c

0
ports/qemu-arm/mcu/arm/stm32.ld → ports/qemu/mcu/arm/stm32.ld

0
ports/qemu-arm/mcu/rv32/entrypoint.s → ports/qemu/mcu/rv32/entrypoint.s

0
ports/qemu-arm/mcu/rv32/interrupts.c → ports/qemu/mcu/rv32/interrupts.c

0
ports/qemu-arm/mcu/rv32/startup.c → ports/qemu/mcu/rv32/startup.c

0
ports/qemu-arm/mcu/rv32/virt.ld → ports/qemu/mcu/rv32/virt.ld

0
ports/qemu-arm/modmachine.c → ports/qemu/modmachine.c

8
ports/qemu-arm/mpconfigport.h → 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)

0
ports/qemu-arm/mphalport.c → ports/qemu/mphalport.c

0
ports/qemu-arm/mphalport.h → ports/qemu/mphalport.h

0
ports/qemu-arm/qstrdefsport.h → ports/qemu/qstrdefsport.h

0
ports/qemu-arm/test-frzmpy/frozen_asm.py → ports/qemu/test-frzmpy/frozen_asm.py

0
ports/qemu-arm/test-frzmpy/frozen_const.py → ports/qemu/test-frzmpy/frozen_const.py

0
ports/qemu-arm/test-frzmpy/frozen_viper.py → ports/qemu/test-frzmpy/frozen_viper.py

0
ports/qemu-arm/test-frzmpy/native_frozen_align.py → ports/qemu/test-frzmpy/native_frozen_align.py

0
ports/qemu-arm/uart.c → ports/qemu/uart.c

0
ports/qemu-arm/uart.h → ports/qemu/uart.h

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

0
tests/ports/qemu-arm/asm_test.py → tests/ports/qemu/asm_test.py

0
tests/ports/qemu-arm/asm_test.py.exp → tests/ports/qemu/asm_test.py.exp

0
tests/ports/qemu-arm/native_test.py → tests/ports/qemu/native_test.py

0
tests/ports/qemu-arm/native_test.py.exp → tests/ports/qemu/native_test.py.exp

0
tests/ports/qemu-arm/viper_test.py → tests/ports/qemu/viper_test.py

0
tests/ports/qemu-arm/viper_test.py.exp → tests/ports/qemu/viper_test.py.exp

8
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")

16
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
}
########################################################################################

Loading…
Cancel
Save