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

openocd: finer-grained error msg if board unknown #108

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions tockloader/openocd.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,16 @@ def determine_current_board(self):
self._configure_from_known_boards()

# Check that we learned what we needed to learn.
if (
self.board == None
or self.arch == None
or self.openocd_board == "cortex-m0"
or self.page_size == 0
):
if self.board is None:
raise TockLoaderException("Could not determine the current board")
if self.arch is None:
raise TockLoaderException("Could not determine the current arch")
if self.openocd_board == "cortex-m0":
raise TockLoaderException(
"Could not determine the current board or arch or openocd board name"
"Could not determine the current openocd board name"
)
if self.page_size == 0:
raise TockLoaderException("Could not determine the current page size")

def run_terminal(self):
self.open_link_to_board()
Expand Down
Loading