zephyr/boards/arm/nrf9160_innblue22
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
..
doc
board.cmake runners: nrfjprog: boilerplate and recover rework 2020-12-09 15:00:24 -06:00
CMakeLists.txt
innblue22_board_init.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
Kconfig.board
Kconfig.defconfig
nrf9160_innblue22_common.dts boards: arm: remove non-existing doc link from partition definitions 2020-10-27 15:01:19 -04:00
nrf9160_innblue22_defconfig
nrf9160_innblue22_partition_conf.dts
nrf9160_innblue22.dts
nrf9160_innblue22.yaml
nrf9160_innblue22ns_defconfig
nrf9160_innblue22ns.dts
nrf9160_innblue22ns.yaml