Lines Matching +full:- +full:- +full:erase
4 # SPDX-License-Identifier: Apache-2.0
18 '''Runner front-end for nrfjprog.'''
20 def __init__(self, cfg, family, softreset, dev_id, erase=False, argument
24 super().__init__(cfg, family, softreset, dev_id, erase, reset,
34 def tool_opt_help(cls) -> str:
35 return 'Additional options for nrfjprog, e.g. "--clockspeed"'
40 args.dev_id, erase=args.erase,
47 parser.add_argument('--qspiini', required=False, dest='qspi_ini',
51 snrs = self.check_output(['nrfjprog', '--ids'])
67 core_opt = ['--coprocessor', cores[op['core']]] \
74 if op_type == 'pinreset-enable':
75 cmd.append('--pinresetenable')
77 cmd.append('--program')
79 erase = _op['chip_erase_mode']
80 if erase == 'ERASE_ALL':
81 cmd.append('--chiperase')
82 elif erase == 'ERASE_PAGES':
83 cmd.append('--sectorerase')
84 elif erase == 'ERASE_PAGES_INCLUDING_UICR':
85 cmd.append('--sectoranduicrerase')
86 elif erase == 'NO_ERASE':
89 raise RuntimeError(f'Invalid erase mode: {erase}')
92 # In the future there might be multiple QSPI erase modes
93 cmd.append('--qspisectorerase')
96 cmd.append('--verify')
98 cmd.append('--qspiini')
101 cmd.append('--recover')
104 cmd.append('--reset')
106 cmd.append('--pinreset')
108 cmd.append('--erasepage')
114 self.check_call(cmd + ['-f', families[self.family]] + core_opt +
115 ['--snr', self.dev_id] + self.tool_opt)