zephyr/scripts
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
..
checkpatch
ci ci: run_ci.sh: retry failed west update for PR builds 2020-11-23 14:42:54 -05:00
coccinelle
coredump
dts devicetree: make DT_PROP_HAS_IDX expand to 0 or 1 2020-11-15 08:44:56 -06:00
footprint
gitlint
kconfig dts: remove legacy macro support 2020-10-09 08:45:38 -05:00
net net: scripts: Make test runner script fully generic 2020-11-20 16:07:59 +02:00
release
sanity_chk sanitycheck: fix json file generation 2020-12-09 08:21:02 -05:00
support
tests sanitycheck: tests: simplify filter testcase 2020-12-01 15:36:19 -05:00
tracing
west_commands runners: nrfjprog: boilerplate and recover rework 2020-12-09 15:00:24 -06:00
.gitignore
checkpatch.pl
checkstack.pl
coccicheck
dir_is_writeable.py
file2hex.py
filter-known-issues.py
gen_app_partitions.py
gen_cfb_font_header.py
gen_gcov_files.py
gen_kobject_list.py
gen_offset_header.py
gen_relocate_app.py
gen_syscalls.py
get_maintainer.py
mergehex.py
parse_syscalls.py
process_gperf.py
requirements-base.txt ARC: west: mdb runner: record MDB's CLD process pid to file 2020-11-11 08:18:38 -05:00
requirements-build-test.txt
requirements-compliance.txt
requirements-doc.txt doc: bump sphinx>=3.3.0 2020-11-03 10:24:25 -06:00
requirements-extras.txt scripts: Add imgtool to requirements 2020-11-16 13:38:47 +01:00
requirements-run-test.txt
requirements.txt
sanitycheck sanitycheck: add option to treat overflows as errors 2020-12-01 15:36:19 -05:00
series-push-hook.sh scripts: series-push-hook: Fix behavior after rebase 2020-10-21 07:16:54 -05:00
spelling.txt
subfolder_list.py
tags.sh
user_wordsize.py
valgrind.supp
west-commands.yml
zephyr_module.py scripts: ensuring posix path on module defined roots. 2020-10-15 22:07:11 -04:00