Open ithinuel opened 2 months ago
Can you give an example of a board and the needed patch for switching between the two? Perhaps a board variant could solve this.
The gist of the patch more or less what https://docs.zephyrproject.org/latest/develop/test/twister.html#running-tests-on-custom-emulator.
For example, on Corstone-300 (aka mps3/an547
) this line does enable run_armfvp
as a west build ... -t run_armfvp
target.
Without the changes to simulation
and simulation_exec
in boards/arm/mps3/mps3_an547.yaml
, west twister
won't run those tests on FVP, but with those changes they can no longer be run on Qemu.
EDIT:
With regards to variant, although I guess it could work to some extent, lets consider a system such as the mps2/an521
that has two cores each with a security extension we'd get:
That would be a lot of code duplication (unless zephyr supports a way to include/extend another yaml file).
Is your enhancement proposal related to a problem? Please describe.
Switching between QEMU and another simulator (such as Arm FVP) requires editing the board yaml file.
Describe the solution you'd like
I'd like to have an argument to twister to select the simulator, similarly to what
--west-runner
does.Describe alternatives you've considered
For now the solution is to patch zephyr in CI before running the tests. It may be possible to do something with CMake's property to alter a yaml file (like it is possible to configure tfm's hex file name before flashing with pyocd).
Additional context
-