zephyr/scripts/west_commands/tests
Martí Bolívar 6628a16e4d runners: nrfjprog: boilerplate and recover rework
Rework the runner to improve various issues.

Every board.cmake file for an nRF SoC target is repeating boilerplate
needed for the nrfjprog runner's --nrf-family argument. The
information we need to decide the --nrf-family is already available in
Kconfig, so just get it from there instead. Keep the --nrf-family
argument around for compatibility, though.

This cuts boilerplate burden for board maintainers.

We also need to revisit how this runner handles recovery to fix it
in nRF53 and keep things consistent everywhere else.

To cleanly handle additional readback protection features in nRF53,
add a --recover option that does an 'nrfjprog --recover' before
flashing. Keep the behavior consistent across SoCs by supporting it on
those too. Because this is expected to be a bit tricky for users to
understand, check if a --recover is needed if the 'nrfjprog --program'
fails because of protection, and tell the user how to fix it.

Finally, instead of performing a separate 'nrfjprog --eraseall', just
give --chiperase to 'nrfjprog --program' process's arguments instead
of --sectorerase. This is cleaner, resulting in fewer subprocesses and
avoiding an extra chip reset.

Having a separate 'west flash --recover' option doubles the number of
test cases if we want to keep exhaustively enumerating them. That
doesn't feel worthwhile, so update the test cases by picking a
representative subset of the possibilities. Each test now has enough
state that it's worth wrapping it up in a named tuple for readability.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-12-09 15:00:24 -06:00
..
conftest.py
test_blackmagicprobe.py
test_bossac.py scripts: runners: bossac: Fix offset parameter 2020-12-03 10:50:23 -06:00
test_build.py
test_canopen_program.py
test_dediprog.py
test_dfu_util.py
test_imports.py ARC: west: split mdb runner for mdb-hw & mdb-nsim runners 2020-11-11 08:18:38 -05:00
test_mdb.py ARC: west: mdb runner: record MDB's CLD process pid to file 2020-11-11 08:18:38 -05:00
test_nrfjprog.py runners: nrfjprog: boilerplate and recover rework 2020-12-09 15:00:24 -06:00
test_pyocd.py
test_stm32cubeprogrammer.py runners: stm32cubeprogrammer: add tests 2020-11-04 14:47:35 -06:00
test_stm32flash.py