build: interpose zephyr_flash_debug.py in debug/debugserver targets

Just as was previously done for flashing, invoke zephyr_flash_debug.py
from the build system debug and debugserver targets by default. The
Python script will fall back on the corresponding shell script if it
doesn't have its own implementation.

The shell script can be used instead, just as with flashing, by
setting USE_ZEPHYR_FLASH_DEBUG_SHELL to any nonempty value.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
This commit is contained in:
Marti Bolivar 2017-10-17 22:52:30 -04:00 committed by Anas Nashif
commit fad998f410
2 changed files with 10 additions and 1 deletions

View file

@ -1390,9 +1390,13 @@ flash: FORCE
endif
ifneq ($(DEBUG_SCRIPT),)
ifeq ($(USE_ZEPHYR_FLASH_DEBUG_SHELL),)
debug: zephyr
$(Q)$(srctree)/scripts/support/zephyr_flash_debug.py debug $(srctree)/scripts/support/$(DEBUG_SCRIPT)
else
debug: zephyr
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/support/$(DEBUG_SCRIPT) debug
endif
else
debug: FORCE
@echo Debugging not supported with this board.