From d01b157cad888a62bfae6d823ea65d12e124768e Mon Sep 17 00:00:00 2001
From: "Wesley W. Terpstra" <w.terpstra@gsi.de>
Date: Thu, 4 Apr 2013 16:14:07 +0200
Subject: [PATCH] usb: add an option to test a program without flashing it

---
 hdl/eb_usb_core/flash-fx2lp.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hdl/eb_usb_core/flash-fx2lp.sh b/hdl/eb_usb_core/flash-fx2lp.sh
index 63e2b0b..046c5fe 100755
--- a/hdl/eb_usb_core/flash-fx2lp.sh
+++ b/hdl/eb_usb_core/flash-fx2lp.sh
@@ -20,8 +20,10 @@ dev=`busid $PROGRAMMED $RAW_CYPRESS`
 # If unprogrammed, "usbtest" steals the device
 rmmod usbtest 2>/dev/null
 
-if [ "$1" = "-E" ]; then
+if [ "$1" = "-E" ]; then # erase
   fxload -D "$dev" -tfx2lp -I erase_eeprom.ihx -v
-else
+elif [ "$1" = "-T" ]; then # test
+  fxload -D "$dev" -tfx2lp -I cdc_acm.ihx -v
+else # flash
   fxload -D "$dev" -tfx2lp -I cdc_acm.ihx -s vend_ax.hex -c 0x41 -v
 fi
-- 
GitLab