Skip to content

Commit 66d4d83

Browse files
Marti Bolivargalak
authored andcommitted
scripts: runner: nrfjprog: remove BOARD environment requirement
The BOARD variable has been removed from the environment provided to runners. It's not being used to flash the board, so just remove the check for it to avoid an exception at runtime. Signed-off-by: Marti Bolivar <[email protected]>
1 parent 7bb1786 commit 66d4d83

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

scripts/support/runner/nrfjprog.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313
class NrfJprogBinaryRunner(ZephyrBinaryRunner):
1414
'''Runner front-end for nrfjprog.'''
1515

16-
def __init__(self, hex_, family, board, debug=False):
16+
def __init__(self, hex_, family, debug=False):
1717
super(NrfJprogBinaryRunner, self).__init__(debug=debug)
1818
self.hex_ = hex_
1919
self.family = family
20-
self.board = board
2120

2221
def replaces_shell_script(shell_script, command):
2322
return command == 'flash' and shell_script == 'nrf_flash.sh'
@@ -30,14 +29,12 @@ def create_from_env(command, debug):
3029
- O: build output directory
3130
- KERNEL_HEX_NAME: name of kernel binary in ELF format
3231
- NRF_FAMILY: e.g. NRF51 or NRF52
33-
- BOARD: Zephyr board name
3432
'''
3533
hex_ = path.join(get_env_or_bail('O'),
3634
get_env_or_bail('KERNEL_HEX_NAME'))
3735
family = get_env_or_bail('NRF_FAMILY')
38-
board = get_env_or_bail('BOARD')
3936

40-
return NrfJprogBinaryRunner(hex_, family, board, debug=debug)
37+
return NrfJprogBinaryRunner(hex_, family, debug=debug)
4138

4239
def get_board_snr_from_user(self):
4340
snrs = self.check_output(['nrfjprog', '--ids'])
@@ -92,5 +89,5 @@ def run(self, command, **kwargs):
9289
for cmd in commands:
9390
self.check_call(cmd)
9491

95-
print('{} Serial Number {} flashed with success.'.format(
96-
self.board, board_snr))
92+
print('Board with serial number {} flashed successfully.'.format(
93+
board_snr))

0 commit comments

Comments
 (0)