Skip to content
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

Merged
merged 19 commits into from Mar 22, 2017
Merged

Add --reset-gateware #54

merged 19 commits into from Mar 22, 2017

Conversation

mithro
Copy link
Member

@mithro mithro commented Feb 20, 2017

No description provided.

@mithro
Copy link
Member Author

mithro commented Feb 20, 2017

Don't merge until we have tested!

@mithro mithro requested a review from stefanor February 20, 2017 09:01
@mithro
Copy link
Member Author

mithro commented Feb 20, 2017

@stefanor Can you give this a test?

@@ -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.')
Copy link
Contributor

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'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

assert board.state == "jtag", board
assert not board.dev.inuse()
assert board.type in OPENOCD_MAPPING
return _openocd_script(board, script, verbose)
Copy link
Contributor

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)

Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

cmdline,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
encoding='utf-8')
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

class OpenOCDError(subprocess.CalledProcessError):
def __init__(self, msg, returncode, cmd, output):
subprocess.CalledProcessError.__init__(
returncode, cmd, output)
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@stefanor
Copy link
Contributor

Doesn't seem to work on the opsis, yet.

@mithro mithro merged commit 6a2d445 into timvideos:master Mar 22, 2017
@mithro mithro deleted the reset-gateware branch September 25, 2017 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants