cmake: add helpers for setting board runners
This helps by letting us add checks for when the runner has already been set. There is documentation saying you can set -DBOARD_DEBUG_RUNNER at the command line and have it take effect, which turns out not to be true for a large number of boards. A status message helps the user debug. (We'll address the existing in-tree boards in the next patch.) Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
9f851cc2dc
commit
1717332c7a
41 changed files with 148 additions and 88 deletions
|
@ -1,12 +1,12 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(DEFINED ENV{ZEPHYR_FLASH_OVER_DFU})
|
||||
set(BOARD_FLASH_RUNNER dfu-util)
|
||||
board_set_flasher(dfu-util)
|
||||
else()
|
||||
set(BOARD_FLASH_RUNNER openocd)
|
||||
board_set_flasher(openocd)
|
||||
endif()
|
||||
|
||||
set(BOARD_DEBUG_RUNNER openocd)
|
||||
board_set_debugger(openocd)
|
||||
|
||||
board_runner_args(dfu-util "--pid=8087:0aba" "--alt=sensor_core")
|
||||
board_runner_args(openocd --cmd-pre-load "targets 1" "--gdb-port=3334")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# TODO: can this board just use the usual openocd runner?
|
||||
set(BOARD_FLASH_RUNNER em-starterkit)
|
||||
set(BOARD_DEBUG_RUNNER em-starterkit)
|
||||
board_set_flasher(em-starterkit)
|
||||
board_set_debugger(em-starterkit)
|
||||
board_finalize_runner_args(em-starterkit)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# TODO: can this board just use the usual openocd runner?
|
||||
set(BOARD_FLASH_RUNNER em-starterkit)
|
||||
set(BOARD_DEBUG_RUNNER em-starterkit)
|
||||
board_set_flasher(em-starterkit)
|
||||
board_set_debugger(em-starterkit)
|
||||
board_finalize_runner_args(em-starterkit)
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
set(EMU_PLATFORM nsim)
|
||||
|
||||
set(BOARD_FLASH_RUNNER arc-nsim)
|
||||
set(BOARD_DEBUG_RUNNER arc-nsim)
|
||||
board_set_flasher(arc-nsim)
|
||||
board_set_debugger(arc-nsim)
|
||||
|
||||
if(${CONFIG_SOC_NSIM_EM})
|
||||
board_runner_args(arc-nsim "--props=nsim_em.props")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue