1# SPDX-License-Identifier: Apache-2.0 2 3board_set_flasher_ifnset(openocd) 4board_set_debugger_ifnset(openocd) 5 6# "load_image" or "flash write_image erase"? 7if(CONFIG_X86 OR CONFIG_ARC) 8 set_ifndef(OPENOCD_USE_LOAD_IMAGE YES) 9endif() 10if(OPENOCD_USE_LOAD_IMAGE) 11 set_ifndef(OPENOCD_FLASH load_image) 12else() 13 set_ifndef(OPENOCD_FLASH "flash write_image erase") 14endif() 15 16set(OPENOCD_CMD_LOAD_DEFAULT "${OPENOCD_FLASH}") 17set(OPENOCD_CMD_VERIFY_DEFAULT "verify_image") 18 19board_finalize_runner_args(openocd 20 --cmd-load "${OPENOCD_CMD_LOAD_DEFAULT}" 21 --cmd-verify "${OPENOCD_CMD_VERIFY_DEFAULT}" 22 ) 23