Skip to content

Commit

Permalink
Merge pull request #108 from wprzytula/finer-grained-unknown-board-error
Browse files Browse the repository at this point in the history
openocd: finer-grained error msg if board unknown
  • Loading branch information
lschuermann committed Mar 1, 2024
2 parents 9ded71c + e01264a commit 4119893
Showing 1 changed file with 8 additions and 7 deletions.
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

0 comments on commit 4119893

Please sign in to comment.