updated readme
authorGreg Davill <greg.davill@gmail.com>
Sun, 19 Apr 2020 10:27:51 +0000 (19:57 +0930)
committerGreg Davill <greg.davill@gmail.com>
Sun, 19 Apr 2020 10:27:51 +0000 (19:57 +0930)
README.md

index e4b5ffad9713ca45b06c508656b8d9629810e6ee..764ae208dd60cd2d67abdca8ecb018686eb8b605 100644 (file)
--- a/README.md
+++ b/README.md
@@ -20,4 +20,52 @@ git clone https://github.com/gregdavill/ecpprog ecpprog
 cd ecpprog/ecpprog
 make
 sudo make install
+```
+
+## Usage
+
+### Verify JTAG connection
+```
+$ ecpprog -t
+  init..
+  IDCODE: 0x41111043 (LFE5U-25)
+  ECP5 Status Register: 0x00200000
+  flash ID: 0xEF 0x40 0x18 0x00
+  Bye.
+```
+
+### Flash a bitstream
+```
+$ ecpprog /path/to/bitstream.bit
+  init..
+  IDCODE: 0x41111043 (LFE5U-25)
+  ECP5 Status Register: 0x00200000
+  reset..
+  flash ID: 0xEF 0x40 0x18 0x00
+  file size: 99302
+  erase 64kB sector at 0x000000..
+  erase 64kB sector at 0x010000..
+  programming..  99302/99302
+  verify..       99302/99302  VERIFY OK
+  Bye.
+```
+
+### Flash User/SoC code
+```
+$ ecpprog -o 1M firmware.bin 
+  init..
+  IDCODE: 0x41111043 (LFE5U-25)
+  ECP5 Status Register: 0x00200000
+  reset..
+  flash ID: 0xEF 0x40 0x18 0x00
+  file size: 294312
+  erase 64kB sector at 0x100000..
+  erase 64kB sector at 0x110000..
+  erase 64kB sector at 0x120000..
+  erase 64kB sector at 0x130000..
+  erase 64kB sector at 0x140000..
+  programming..  294312/294312
+  verify..       262144/294312  VERIFY OK
+  Bye.
+
 ```
\ No newline at end of file