Merge pull request #15486 from aabadie/pr/make/emulator_enh
make: handle emulator backend in Makefile.include
This commit is contained in:
commit
638cb00a28
@ -395,6 +395,13 @@ include $(BOARDDIR)/Makefile.include
|
|||||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
||||||
include $(RIOTCPU)/$(CPU)/Makefile.include
|
include $(RIOTCPU)/$(CPU)/Makefile.include
|
||||||
|
|
||||||
|
# Include emulator code if available and if emulate target is used
|
||||||
|
ifneq (,$(filter emulate,$(MAKECMDGOALS)))
|
||||||
|
# Use renode as default emulator
|
||||||
|
RIOT_EMULATOR ?= renode
|
||||||
|
-include $(RIOTMAKE)/tools/$(RIOT_EMULATOR).inc.mk
|
||||||
|
endif
|
||||||
|
|
||||||
# Assume GCC/GNU as supported toolchain if CPU's Makefile.include doesn't
|
# Assume GCC/GNU as supported toolchain if CPU's Makefile.include doesn't
|
||||||
# provide this macro
|
# provide this macro
|
||||||
TOOLCHAINS_SUPPORTED ?= gnu
|
TOOLCHAINS_SUPPORTED ?= gnu
|
||||||
|
|||||||
@ -6,7 +6,4 @@ PROGRAMMER_SERIAL ?= 06EB
|
|||||||
PORT_LINUX ?= $(word 2,$(shell $(RIOTTOOLS)/usb-serial/find-tty.sh '^$(PROGRAMMER_SERIAL)'))
|
PORT_LINUX ?= $(word 2,$(shell $(RIOTTOOLS)/usb-serial/find-tty.sh '^$(PROGRAMMER_SERIAL)'))
|
||||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
||||||
|
|
||||||
# setup emulator
|
|
||||||
include $(RIOTMAKE)/tools/renode.inc.mk
|
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/cc2538/Makefile.include
|
include $(RIOTBOARD)/common/cc2538/Makefile.include
|
||||||
|
|||||||
@ -12,11 +12,7 @@ else ifeq (pyocd,$(PROGRAMMER))
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# QEMU 4.0 added microbit system emulation.
|
# QEMU 4.0 added microbit system emulation.
|
||||||
EMULATOR = qemu-system-arm
|
RIOT_EMULATOR ?= qemu
|
||||||
EMULATOR_FLAGS = -M microbit -device loader,file=$(ELFFILE) \
|
|
||||||
-serial stdio \
|
|
||||||
-monitor telnet::45454,server,nowait \
|
|
||||||
-nographic
|
|
||||||
|
|
||||||
# include nrf51 boards common configuration
|
# include nrf51 boards common configuration
|
||||||
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
include $(RIOTBOARD)/common/nrf51/Makefile.include
|
||||||
|
|||||||
9
makefiles/tools/qemu.inc.mk
Normal file
9
makefiles/tools/qemu.inc.mk
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
EMULATOR ?= qemu-system-arm
|
||||||
|
EMULATOR_MACHINE ?= $(BOARD)
|
||||||
|
EMULATOR_MONITOR_PORT ?= 45454
|
||||||
|
EMULATOR_MONITOR_FLAGS ?= telnet::$(EMULATOR_MONITOR_PORT),server,nowait
|
||||||
|
|
||||||
|
EMULATOR_FLAGS = -machine $(EMULATOR_MACHINE) -device loader,file=$(ELFFILE) \
|
||||||
|
-serial stdio \
|
||||||
|
-monitor $(EMULATOR_MONITOR_FLAGS) \
|
||||||
|
-nographic
|
||||||
Loading…
x
Reference in New Issue
Block a user