diff options
author | Anas Nashif <anas.nashif@intel.com> | 2017-01-07 16:31:34 -0500 |
---|---|---|
committer | Anas Nashif <nashif@linux.intel.com> | 2017-01-10 20:20:47 +0000 |
commit | 2bc9d699817e611dbe144f332fb7067f540b8e19 (patch) | |
tree | 625353ec54dc072834e8f1b8236416174ec31ef1 /Makefile | |
parent | 6bea1becab8855cb6b898b5fd1242ca2ad4afbe3 (diff) |
build: abstract emulation and replace qemu goal with run
This will replace the current goal of 'make qemu' with 'make run' and
moves Qemu handling into its own file and into the boards instead of
being architecture specific.
We should be able to add new boards that support some other type of
emulation (by adding scripts/Makefile.<emu type>) and allow the board to
define their own options for the use type of emulation.
'make qemu' will still work, however it will be deprecated, starting
with this commit it is recommended to use 'make run'.
Jira: ZEP-359
Change-Id: I1cacd56b4ec09421a58cf5d010e22e9035214df6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 31 |
1 files changed, 10 insertions, 21 deletions
@@ -1134,8 +1134,9 @@ help: @echo 'Other generic targets:' @echo ' all - Build all targets marked with [*]' @echo '* zephyr - Build a zephyr application' - @echo ' qemu - Build a zephyr application and run it in qemu' - @echo ' qemugdb - Same as 'qemu' but start a GDB server on port 1234' + @echo ' run - Build a zephyr application and run it if board supports emulation' + @echo ' qemu - Build a zephyr application and run it in qemu [deprecated]' + @echo ' qemugdb - Same as 'qemu' but start a GDB server on port 1234 [deprecated]' @echo ' flash - Build and flash an application' @echo ' debug - Build and debug an application using GDB' @echo ' debugserver - Build and start a GDB server (port 1234 for Qemu targets)' @@ -1238,29 +1239,17 @@ tools/%: FORCE $(Q)mkdir -p $(objtree)/tools $(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(objtree) subdir=tools -C $(src)/tools/ $* -QEMU_FLAGS = $(QEMU_FLAGS_$(ARCH)) -pidfile qemu.pid +-include $(srctree)/boards/$(ARCH)/$(BOARD_NAME)/Makefile.board -ifneq ($(QEMU_PTY),) - QEMU_FLAGS += -serial pty -else -ifneq ($(QEMU_PIPE),) - # Send console output to a pipe, used for running automated sanity tests - QEMU_FLAGS += -serial pipe:$(QEMU_PIPE) +ifneq ($(EMU_PLATFORM),) +-include $(srctree)/scripts/Makefile.$(EMU_PLATFORM) else - QEMU_FLAGS += -serial mon:stdio -endif +run: + @echo =================================================== + @echo Emulation/Simulation not supported with this board. + @echo =================================================== endif -qemu: zephyr - $(if $(QEMU_PIPE),,@echo "To exit from QEMU enter: 'CTRL+a, x'") - @echo '[QEMU] CPU: $(QEMU_CPU_TYPE_$(ARCH))' - $(if $(CONFIG_X86_IAMCU),python $(ZEPHYR_BASE)/scripts/qemu-machine-hack.py $(KERNEL_ELF_NAME)) - $(Q)$(QEMU) $(QEMU_FLAGS) $(QEMU_EXTRA_FLAGS) -kernel $(KERNEL_ELF_NAME) - -# FIXME: Deprecated -qemugdb: debugserver - --include $(srctree)/boards/$(ARCH)/$(BOARD_NAME)/Makefile.board ifneq ($(FLASH_SCRIPT),) flash: zephyr @echo "Flashing $(BOARD_NAME)" |