diff --git a/Makefile.inc b/Makefile.inc index beef623fe81..b44048298ca 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -99,6 +99,7 @@ flash: $(DOTCONFIG) $(Q)$(call zephyrmake,$(O),$@) ifeq ($(MAKECMDGOALS),debugserver) +ARCH = $(notdir $(subst /$(BOARD),,$(wildcard $(ZEPHYR_BASE)/boards/*/$(BOARD)))) -include $(ZEPHYR_BASE)/boards/$(ARCH)/$(BOARD)/Makefile.board -include $(ZEPHYR_BASE)/scripts/Makefile.toolchain.$(ZEPHYR_GCC_VARIANT) BOARD_NAME = $(BOARD)