2020-11-20 14:17:54 +01:00
|
|
|
EMULATOR ?= qemu-system-arm
|
|
|
|
EMULATOR_MACHINE ?= $(BOARD)
|
|
|
|
EMULATOR_MONITOR_PORT ?= 45454
|
|
|
|
EMULATOR_MONITOR_FLAGS ?= telnet::$(EMULATOR_MONITOR_PORT),server,nowait
|
2020-11-22 10:36:22 +01:00
|
|
|
FLASHFILE ?= $(ELFFILE)
|
2020-11-20 14:17:54 +01:00
|
|
|
|
|
|
|
EMULATOR_FLAGS = -machine $(EMULATOR_MACHINE) -device loader,file=$(ELFFILE) \
|
2020-11-22 18:14:56 +01:00
|
|
|
-serial telnet::5555,server,nowait,nodelay \
|
2020-11-20 14:17:54 +01:00
|
|
|
-monitor $(EMULATOR_MONITOR_FLAGS) \
|
|
|
|
-nographic
|
2020-11-21 22:34:41 +01:00
|
|
|
|
2020-11-22 18:14:56 +01:00
|
|
|
# Configure the qemu terminal access
|
|
|
|
PORT = /tmp/riot_$(APPLICATION)_$(BOARD)_uart
|
|
|
|
RIOT_TERMPROG := $(TERMPROG)
|
|
|
|
RIOT_TERMFLAGS := $(TERMFLAGS)
|
|
|
|
TERMPROG := $(RIOTTOOLS)/emulator/term.sh
|
|
|
|
TERMFLAGS := $(RIOT_EMULATOR) $(BOARD) $(APPDIR) $(RIOT_TERMPROG) '$(RIOT_TERMFLAGS)' $(PORT)
|
|
|
|
|
2020-11-21 22:34:41 +01:00
|
|
|
# Configure the debugger
|
|
|
|
GDB_PORT ?= 3333
|
|
|
|
QEMU_DEBUG_FLAGS += -S -gdb tcp::$(GDB_PORT)
|
|
|
|
QEMU_DEBUG_FLAGS += $(EMULATOR_FLAGS)
|
|
|
|
|
|
|
|
DEBUGSERVER ?= $(EMULATOR)
|
|
|
|
DEBUGSERVER_FLAGS ?= $(QEMU_DEBUG_FLAGS)
|
|
|
|
|
|
|
|
DEBUGGER_FLAGS ?= $(BOARD) $(APPDIR) $(ELFFILE) $(GDB_PORT)
|
2020-11-21 22:50:18 +01:00
|
|
|
DEBUGGER ?= $(RIOTTOOLS)/emulator/debug.sh
|