<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run(self, resources):
 """Runs the flash step Args: resources (dict):
 A dictionary containing the required resources that we needed access to in order to perform this step. """

        if not resources['connection']._port.startswith('jlink'):
            raise ArgumentError("FlashBoardStep is currently only possible through jlink", invalid_port=args['port'])

        hwman = resources['connection']
        debug = hwman.hwman.debug(self._debug_string)
        debug.flash(self._file)