Lines Matching +full:partition +full:- +full:erase

4 # SPDX-License-Identifier: Apache-2.0
6 '''bossac-specific runner (flash only) for Atmel SAM microcontrollers.'''
25 '''Runner front-end for bossac.'''
28 speed=DEFAULT_BOSSAC_SPEED, boot_delay=0, erase=False): argument
34 self.erase = erase
42 return RunnerCaps(commands={'flash'}, erase=True)
46 parser.add_argument('--bossac', default='bossac',
48 parser.add_argument('--bossac-port', default=DEFAULT_BOSSAC_PORT,
51 parser.add_argument('--speed', default=DEFAULT_BOSSAC_SPEED,
54 parser.add_argument('--delay', default=0, type=float,
64 boot_delay=args.delay, erase=args.erase)
67 """Run bossac --help and return the output as a list of lines"""
71 out = self.check_output([self.bossac, '--help']).decode()
92 # Get the EDT Node corresponding to the zephyr,code-partition
113 return edt.chosen_node('zephyr,code-partition')
138 ' --offset flag. Please upgrade to a newer Zephyr' \
149 ['stty', '--version'], capture_output=True, text=True, check=True
160 flag = '-F' if self.is_gnu_coreutils_stty() else '-f'
166 'ospeed', self.speed, 'cs8', '-cstopb', 'ignpar',
184 cmd_flash = [self.bossac, '-p', self.port, '-R', '-w', '-v',
185 '-b', self.cfg.bin_file]
187 if self.erase:
188 cmd_flash += ['-e']
194 error_msg = 'The device tree zephyr,code-partition chosen' \
199 offset = self.get_image_offset(self.supports('--offset'))
202 cmd_flash += ['-o', str(offset)]
208 ' zephyr,code-partition device tree node should not' \
209 ' be defined. Check Zephyr SAM-BA documentation.'
222 ioreg_out = self.check_output(['ioreg', '-r', '-c', 'IOSerialBSDClient',
223 '-k', 'IOCalloutDevice', '-a'])
246 'input is not a terminal - please specify a '
247 'port using --bossac-port instead)')
254 p = f'Please select one (1-{len(devices)}, or EOF to exit): '
268 return devices[value - 1]