-
Couldn't load subscription status.
- Fork 54
make the --board flag actually do something #16
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
Conversation
Using attributes are great if they're available, but if they're not, then I certainly expect the `--board` flag to set things up correctly for me.
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.
I think this is fine. We had this in Tockloader before in some form or another but took it out for reasons I can't exactly remember.
tockloader/jlinkexe.py
Outdated
| board = self.KNOWN_BOARDS[self.board] | ||
| except KeyError: | ||
| print('Known boards: ' + ', '.join(self.KNOWN_BOARDS.keys())) | ||
| raise TockLoaderException('Unknown board: ' + self.board) |
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.
This shouldn't error here because we don't want to prevent people from developing (and using) their own Tock boards which Tockloader might not know about.
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.
I think this warning is good and important. The --board flag should either set things up correctly, or let the user know that it hasn't. As this is below the arch+device check above, I pushed a change that indicates that custom boards must also specify arch and jtag_device which I think is a good compromise point.
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.
The --board flag was never intended to do what it is doing in this PR. It is there so that apps that are only supposed to work on certain boards do not get loaded onto incompatible boards.
There is no reason that someone with a new board who has the correct attributes setup on the board and runs:
tockloader install --board cool-new-board
should get an error.
|
Also, do you want this to work for setting the correct |
|
@ppannuto you ok with my changes? I think you still get everything you want, but we don't run in to any situations where we might penalize someone for making a custom board. |
|
Yeah, I'm still afraid that we're inviting confusion when people with custom boards don't set enough stuff and things don't work, but this is definitely a step in the right direction and we can cross the other bridge when we come to it. |
Using attributes are great if they're available, but if they're not,
then I certainly expect the
--boardflag to set things up correctlyfor me.