From c3487ccf4ffb62e1eac71a0825792f74012cd72e Mon Sep 17 00:00:00 2001 From: COKPOWEHEU Date: Sun, 28 Jul 2024 09:55:21 +0300 Subject: [PATCH] Add test for Karakatitsa hardware (https://karakatitsariscv.github.io/Karakatitsa.html) --- Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Makefile b/Makefile index c39f3fa..a95518b 100644 --- a/Makefile +++ b/Makefile @@ -75,5 +75,24 @@ dist: clean: rm -f $(OBJ) $(BIN) $(MAN) + +test: + @if [ $(PORT)"" = "" ] ; then \ + echo "examples: " ;\ + echo "make PORT=/dev/ttyUSB0 test" ;\ + echo "./"$(BIN)" --port=USB info" ;\ + echo "./"$(BIN)" --port='//./COM3' --reset=RTS --boot0=DTR info" ;\ + else \ + stty -F $(PORT) 300 ;\ + stty -F $(PORT) 50 ;\ + bash -c "echo 'RBU' > $(PORT)" ;\ + bash -c "echo 'rBU' > $(PORT)" ;\ + sleep 1 ;\ + ./$(BIN) --port=$(PORT) info ;\ + stty -F $(PORT) 50 ;\ + bash -c "echo 'RbU' > $(PORT)" ;\ + sleep 1 ;\ + bash -c "echo 'rbuz' > $(PORT)" ;\ + fi .PHONY: all install uninstall dist clean test