Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ppannuto
Copy link
Member

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.

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.
@ppannuto ppannuto requested a review from bradjc October 17, 2017 01:03
Copy link
Contributor

@bradjc bradjc left a 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.

board = self.KNOWN_BOARDS[self.board]
except KeyError:
print('Known boards: ' + ', '.join(self.KNOWN_BOARDS.keys()))
raise TockLoaderException('Unknown board: ' + self.board)
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

@bradjc
Copy link
Contributor

bradjc commented Oct 18, 2017

Also, do you want this to work for setting the correct arch on the serial connection too?

@bradjc
Copy link
Contributor

bradjc commented Oct 23, 2017

@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.

@ppannuto ppannuto merged commit 4598e80 into master Oct 24, 2017
@ppannuto ppannuto deleted the the-board-flag-should-do-something branch October 24, 2017 01:35
@ppannuto
Copy link
Member Author

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.

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.

3 participants