Skip to content

Commit

Permalink
scripts: west flash: fix --board-id for pyocd
Browse files Browse the repository at this point in the history
Newer pyocd versions (specifically the 0.21.0 we have in our
requirements.txt) no longer support -b and have moved the same option
to -u. Keep up.

Fixes: zephyrproject-rtos#17554
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
  • Loading branch information
mbolivar-nordic committed Aug 19, 2019
1 parent 00fab87 commit 2c49bec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/west_commands/runners/pyocd.py
Expand Up @@ -34,7 +34,7 @@ def __init__(self, cfg, target,

board_args = []
if board_id is not None:
board_args = ['-b', board_id]
board_args = ['-u', board_id]
self.board_args = board_args

daparg_args = []
Expand Down
6 changes: 3 additions & 3 deletions scripts/west_commands/tests/test_pyocd.py
Expand Up @@ -65,7 +65,7 @@
'flash',
'-e', 'sector',
'-a', hex(TEST_ADDR), '-da', TEST_DAPARG,
'-t', TEST_TARGET, '-b', TEST_BOARD_ID,
'-t', TEST_TARGET, '-u', TEST_BOARD_ID,
'-f', TEST_FREQUENCY] +
TEST_FLASH_OPTS +
[RC_KERNEL_HEX])
Expand All @@ -78,7 +78,7 @@
'-da', TEST_DAPARG,
'-p', str(TEST_PORT),
'-t', TEST_TARGET,
'-b', TEST_BOARD_ID,
'-u', TEST_BOARD_ID,
'-f', TEST_FREQUENCY]
DEBUG_ALL_EXPECTED_CLIENT = [RC_GDB, RC_KERNEL_ELF,
'-ex', 'target remote :{}'.format(TEST_PORT),
Expand All @@ -101,7 +101,7 @@
'-da', TEST_DAPARG,
'-p', str(TEST_PORT),
'-t', TEST_TARGET,
'-b', TEST_BOARD_ID,
'-u', TEST_BOARD_ID,
'-f', TEST_FREQUENCY]
DEBUGSERVER_DEF_EXPECTED_CALL = ['pyocd',
'gdbserver',
Expand Down

0 comments on commit 2c49bec

Please sign in to comment.