1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/boards/qemu-i386/Makefile.include
René Kijewski a0985e8819 x86: add proper terminal for qemu-i386
This includes GNU readline features and debugging.

Build with `make BOARD=qemu-i386 all-debug`.
Run with `make BOARD=qemu-i386 term`.

Debug with `make BOARD=qemu-i386 debug`. The default debugger is `gdb`.
Also supported are `debug-tui` (GDB Text User Interface), `debug-kdbg`,
and `debug-ddd`. Set a breakpoint in e.g. "startup" or "main", and
hit/write "continue".

The debugger can only run with a quite new toolchain (e.g. Debian
testing). Ubuntu 13.10. for example will likely report a crash in GDB
when switching from 16bit code to 32bit code.
2014-06-19 12:35:10 +02:00

30 lines
756 B
Makefile

include $(RIOTBOARD)/x86-multiboot-common/Makefile.include
CFLAGS += -march=i686 -mtune=i686
CFLAGS += -I$(RIOTBOARD)/qemu-i386/include
TERMPROG = exec $(RIOTBOARD)/qemu-i386/dist/term.py "qemu-system-i386 -m 512m" $(BINDIRBASE) $(HEXFILE)
FLASHER = true
DEBUGGER = $(TERMPROG)
all:
all-debug: export CFLAGS += -ggdb3 -O0
all-debug: all
debug-kdbg: DEBUGGER_FLAGS="kdbg -r :1234 -- $(ELFFILE)"
debug-kdbg: debug
debug-ddd: DEBUGGER_FLAGS="ddd --eval-command='target remote :1234' $(ELFFILE)"
debug-ddd: debug
debug-tui: DEBUGGER_FLAGS="x-terminal-emulator -e gdb -ex 'target remote :1234' -tui --args $(ELFFILE)"
debug-tui: debug
debug-gdb: debug
DEBUGGER_FLAGS = "x-terminal-emulator -e gdb -ex 'target remote :1234' --args $(ELFFILE)"
debug: