Skip to content

Commit

Permalink
Fix flash failure on 54H20
Browse files Browse the repository at this point in the history
In case of a west flash failure due to memory access
restriction, a device recover for all cores clears
the memory allocations and thus the flash should work

Signed-off-by: Yuxuan Cai <yuxuan.cai@nordicsemi.no>
  • Loading branch information
yuxCai authored and sjanc committed Jan 16, 2025
1 parent 4c5d56e commit 4660e47
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions autopts/ptsprojects/boards/nrf54h.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import logging
import os

from subprocess import CalledProcessError
from autopts.bot.common import check_call

supported_projects = ['zephyr']
Expand Down Expand Up @@ -51,5 +52,9 @@ def build_and_flash(zephyr_wd, board, debugger_snr, conf_file=None, *args):
cmd.extend(('--', f'-DEXTRA_CONF_FILE=\'{conf_file}\''))

check_call(cmd, cwd=tester_dir)
check_call(['west', 'flash', '--skip-rebuild',
'-i', debugger_snr], cwd=tester_dir)
try:
check_call(['west', 'flash', '--skip-rebuild',
'-i', debugger_snr], cwd=tester_dir)
except CalledProcessError:
check_call(['west', 'flash', '--skip-rebuild', '--recover',
'-i', debugger_snr], cwd=tester_dir)

0 comments on commit 4660e47

Please sign in to comment.