! @brief Handle 'flash' subcommand.

def do_flash(self):
        """! @brief Handle 'flash' subcommand."""
        self._increase_logging(["pyocd.tools.loader", "pyocd", "pyocd.flash", "pyocd.flash.flash", "pyocd.flash.flash_builder"])
        
        session = ConnectHelper.session_with_chosen_probe(
                            project_dir=self._args.project_dir,
                            config_file=self._args.config,
                            user_script=self._args.script,
                            no_config=self._args.no_config,
                            pack=self._args.pack,
                            unique_id=self._args.unique_id,
                            target_override=self._args.target_override,
                            frequency=self._args.frequency,
                            blocking=False,
                            **convert_session_options(self._args.options))
        if session is None:
            sys.exit(1)
        with session:
            programmer = loader.FileProgrammer(session,
                                                chip_erase=ERASE_OPTIONS[self._args.erase],
                                                trust_crc=self._args.trust_crc)
            programmer.program(self._args.file,
                                base_address=self._args.base_address,
                                skip=self._args.skip,
                                file_format=self._args.format)