-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --reset-gateware #54
Conversation
Don't merge until we have tested! |
@stefanor Can you give this a test? |
hdmi2usb/modeswitch/cli.py
Outdated
@@ -110,6 +110,9 @@ def args_parser(board, mode): | |||
parser.add_argument( | |||
'--flash-gateware', | |||
help='Flash gateware onto the SPI flash which the FPGA boots from.') | |||
parser.add_argument( | |||
'--reset-gateware', | |||
help='Reset gateware currently running on the FPGA.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a action='store_true'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
hdmi2usb/modeswitch/boards.py
Outdated
assert board.state == "jtag", board | ||
assert not board.dev.inuse() | ||
assert board.type in OPENOCD_MAPPING | ||
return _openocd_script(board, script, verbose) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing location argument. (or verbose=verbose
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err, no, I lie, that's the other helper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
hdmi2usb/modeswitch/boards.py
Outdated
cmdline, | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.STDOUT, | ||
encoding='utf-8') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
encoding is a Python 3.6 feature. I don't think you can rely on that, yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
hdmi2usb/modeswitch/boards.py
Outdated
class OpenOCDError(subprocess.CalledProcessError): | ||
def __init__(self, msg, returncode, cmd, output): | ||
subprocess.CalledProcessError.__init__( | ||
returncode, cmd, output) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing either a super
or self
argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Doesn't seem to work on the opsis, yet. |
2f4f5de
to
6b81368
Compare
No description provided.