If you break semihosting in a way that hangs you need to be able to detect that. Add support for a timeout.
Signed-off-by: Alex Bennée <alex.ben...@linaro.org> --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1296fde..f58b79e 100644 --- a/Makefile +++ b/Makefile @@ -57,10 +57,14 @@ SYSGDB := -gdb tcp::$(GDBPORT) USRGDB := -g $(GDBPORT) endif +ifdef TIMEOUT +SYSTIMEOUT := timeout --foreground 10s +endif + QEMU_ARM = $(QEMU_BUILDDIR)/arm-linux-user/qemu-arm $(USRGDB) QEMU_AARCH64 = $(QEMU_BUILDDIR)/aarch64-linux-user/qemu-aarch64 $(USRGDB) -QEMU_SYSTEM_ARM = $(QEMU_BUILDDIR)/arm-softmmu/qemu-system-arm $(SYSGDB) -QEMU_SYSTEM_AARCH64 = $(QEMU_BUILDDIR)/aarch64-softmmu/qemu-system-aarch64 $(SYSGDB) +QEMU_SYSTEM_ARM = $(SYSTIMEOUT) $(QEMU_BUILDDIR)/arm-softmmu/qemu-system-arm $(SYSGDB) +QEMU_SYSTEM_AARCH64 = $(SYSTIMEOUT) $(QEMU_BUILDDIR)/aarch64-softmmu/qemu-system-aarch64 $(SYSGDB) all: usertest-a32 usertest-a64 usertest-t32 \ systest-a32.axf systest-t32.axf \ -- 2.34.1