Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
break
# Get all the fields from the header
tbfh = TBFHeader(flash)
if tbfh.is_valid():
app = InstalledApp(tbfh, address)
apps.append(app)
address += app.get_size()
else:
break
if self.args.debug:
logging.debug('Found {} app{} on the board.'.format(len(apps), helpers.plural(len(apps))))
for i,app in enumerate(apps):
logging.debug(' {}. {}'.format(i+1, app))
return apps
def command_install (args):
check_and_run_make(args)
# Load in all TABs
tabs = collect_tabs(args)
# Install the apps on the board
tock_loader = TockLoader(args)
tock_loader.open()
# Figure out how we want to do updates
replace = 'yes'
if args.no_replace:
replace = 'no'
logging.status('Installing app{} on the board...'.format(helpers.plural(len(tabs))))
tock_loader.install(tabs, replace=replace, erase=args.erase, sticky=args.sticky)
def command_update (args):
check_and_run_make(args)
tabs = collect_tabs(args)
tock_loader = TockLoader(args)
tock_loader.open()
logging.status('Updating application{} on the board...'.format(helpers.plural(len(tabs))))
tock_loader.install(tabs, replace='only')