Skip to content

Commit f41df1e

Browse files
committed
minimal: Add "run" make target to run emulated build with suitable tty config.
1 parent 5ebabcd commit f41df1e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

minimal/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,13 @@ $(BUILD)/firmware.elf: $(OBJ)
6262
$(Q)$(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
6363
$(Q)$(SIZE) $@
6464

65+
# Run emulation build on a POSIX system with suitable terminal settings
66+
run:
67+
stty raw opost -echo
68+
build/firmware.elf
69+
@echo Resetting terminal...
70+
# This sleep is useful to spot segfaults
71+
sleep 1
72+
reset
73+
6574
include ../py/mkrules.mk

0 commit comments

Comments
 (0)