Studentenversion des ESY6/A Praktikums "signal_processing".
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

execute_on_device_and_read_output.sh 476B

1234567891011121314151617181920212223242526272829303132
  1. #/bin/bash
  2. if [ $# -ne 2 ]
  3. then
  4. echo Usage $0 elf-file output-file
  5. exit 1
  6. fi
  7. echo -n Loading $1 to device ...
  8. nios2-download -g $1 > /dev/null
  9. err=$?
  10. if [ ${err} -ne 0 ]
  11. then
  12. echo " [ FAIL ]"
  13. exit ${err}
  14. fi
  15. echo " [ OK ]"
  16. echo -n Reading outputs from device via nios2-terminal ...
  17. nios2-terminal -q > $2 &
  18. terminal_pid=$!
  19. kill -CONT ${terminal_pid}
  20. while ! tail -n1 $2 | grep "test done" > /dev/null
  21. do
  22. true
  23. done
  24. kill ${terminal_pid}
  25. echo " [ OK ]"