7 Commits

Author SHA1 Message Date
Alessandro Gatti
19be404ad8 qemu/arm: Add definition for the MPS2_AN500 machine.
This commit introduces a new target for the QEMU port called
"MPS2_AN500", an ARMv7-M machine with a Cortex-M7 CPU and
single-/double-precision floating point unit.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2025-08-26 12:27:21 +10:00
Damien George
e750ecff70 qemu/Makefile: Allow passing flags to test_natmod via RUN_TESTS_EXTRA.
Signed-off-by: Damien George <damien@micropython.org>
2025-07-24 14:01:45 +10:00
Alessandro Gatti
dfd1d69a72 tests/run-natmodtests.py: Autodetect the test target architecture.
This commit lets the natmod tests runner to automatically detect the
architecture of the test target.  This allows to avoid to explicitly
pass the architecture name to the runner in test scripts.

However, the ability to manually specify a target was not removed but it
was made optional.  This way the user is able to override the
architecture name if needed (like if one wants to test an armv6 MPY on
an armv7 board).

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2025-02-07 17:37:04 +11:00
Alessandro Gatti
36aa7545b0 qemu/main: Make GC heap size configurable on a per-arch basis.
In certain circumstances depending on the code size, the
`deflate_decompress` test fails on both ARM and RV32 with a memory
allocation failure error.  The issue is mitigated by having a larger GC
heap, in this case around 20 KBytes more than the original 100 KBytes
default.

This commit makes the GC heap size configurable on a per-arch basis, with
both ARM and RV32 using the enlarged 120 KBytes heap.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2025-01-02 11:51:50 +11:00
Alessandro Gatti
7ca6e5eb68 qemu: Add test_natmod target for RV32 and use as part of CI pipeline.
This commit brings the natmod tests in the CI build process for the RV32
platform.  Not all example natmods are tested at the moment, as
`features` requires soft-float support, and `btree` needs thread-local
storage support in `mpy_ld.py` when built with the CI's toolchain.

Co-authored-by: Damien George <damien@micropython.org>
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2024-12-23 10:04:19 +11:00
Damien George
8978102f35 tests/run-tests.py: Change --target/--device options to --test-instance.
Previously to this commit, running the test suite on a bare-metal board
required specifying the target (really platform) and device, eg:

    $ ./run-tests.py --target pyboard --device /dev/ttyACM1

That's quite a lot to type, and you also need to know what the target
platform is, when a lot of the time you either don't care or it doesn't
matter.

This commit makes it easier to run the tests by replacing both of these
options with a single `--test-instance` (`-t` for short) option.  That
option specifies the executable/port/device to test.  Then the target
platform is automatically detected.

The `--test-instance` can be passed:
- "unix" (the default) to use the unix version of MicroPython
- "webassembly" to test the webassembly port
- anything else is considered a port/device to pass to Pyboard

There are also some shortcuts to specify a port/device, following
`mpremote`:
- a<n> is short for /dev/ttyACM<n>
- u<n> is short for /dev/ttyUSB<n>
- c<n> is short for COM<n>

For example:

    $ ./run-tests.py -t a1

Note that the default test instance is "unix" and so this commit does not
change the standard way to run tests on the unix port, by just doing
`./run-tests.py`.

As part of this change, the platform (and it's native architecture if it
supports importing native .mpy files) is show at the start of the test run.

Signed-off-by: Damien George <damien@micropython.org>
2024-11-04 12:47:47 +11:00
Damien George
659113825d qemu: Rename qemu-arm port to qemu.
Because this port now supports multiple architectures.

Signed-off-by: Damien George <damien@micropython.org>
2024-09-06 11:08:39 +10:00