1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/makefiles/tools/renode.inc.mk

43 lines
1.4 KiB
Makefile
Raw Normal View History

RENODE ?= renode
RENODE_IMAGE_FILE ?= $(ELFFILE)
RENODE_BOARD_CONFIG ?= $(BOARDDIR)/dist/board.resc
# Global build system configurations
FLASHFILE ?= $(ELFFILE)
EMULATORDEPS += $(RENODE_BOARD_CONFIG)
# Use renode interactive commands to specify the image file and board config
2020-11-21 13:39:16 +01:00
RENODE_CONFIG_FLAGS += -e "set image_file '$(RENODE_IMAGE_FILE)'"
RENODE_CONFIG_FLAGS += -e "include @$(RENODE_BOARD_CONFIG)"
EMULATOR_PIDFILE ?=
ifneq (,$(EMULATOR_PIDFILE))
$(info Using Renode pid file $(EMULATOR_PIDFILE))
RENODE_CONFIG_FLAGS += --pid-file $(EMULATOR_PIDFILE)
endif
# Configure local serial port
PORT = /tmp/riot_$(APPLICATION)_$(BOARD)_uart
RENODE_CONFIG_FLAGS += -e "emulation CreateUartPtyTerminal \"term\" \"$(PORT)\" true"
RENODE_CONFIG_FLAGS += -e "connector Connect sysbus.uart0 term"
# Set emulator variables
2020-11-21 13:39:16 +01:00
EMULATOR_FLAGS ?= $(RENODE_CONFIG_FLAGS) -e start
EMULATOR ?= $(RENODE)
# Configure the terminal
RIOT_TERMPROG := $(TERMPROG)
RIOT_TERMFLAGS := $(TERMFLAGS)
TERMPROG := $(RIOTTOOLS)/emulator/term.sh
TERMFLAGS := $(RIOT_EMULATOR) $(BOARD) $(APPDIR) $(RIOT_TERMPROG) '$(RIOT_TERMFLAGS)' $(PORT)
# Configure the debugger
GDB_PORT ?= 3333
RENODE_DEBUG_FLAGS += $(RENODE_CONFIG_FLAGS)
RENODE_DEBUG_FLAGS += -e "machine StartGdbServer $(GDB_PORT) true"
DEBUGSERVER ?= $(EMULATOR)
DEBUGSERVER_FLAGS ?= $(RENODE_DEBUG_FLAGS)
DEBUGGER_FLAGS ?= $(BOARD) $(APPDIR) $(ELFFILE) $(GDB_PORT) "-ex \"monitor start\""
DEBUGGER ?= $(RIOTTOOLS)/emulator/debug.sh