How to use the tockloader.openocd.collect_temp_files function in tockloader

To help you get started, we’ve selected a few tockloader examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tock / tockloader / tockloader / tockloader.py View on Github external
self.channel.enter_bootloader_mode()
			else:
				time.sleep(0.2)

			# Now that we have connected to the board and the bootloader
			# if necessary, make sure we know what kind of board we are
			# talking to.
			self.channel.determine_current_board()

			# Set any board-specific options that tockloader needs to use.
			self._update_board_specific_options()

			yield

			if platform.system() == 'Windows':
				for file in collect_temp_files:
					os.remove(file)


			now = time.time()
			logging.info('Finished in {:0.3f} seconds'.format(now-then))
		except Exception as e:
			raise(e)
		finally:
			self.channel.exit_bootloader_mode()