Commit Graph

43 Commits

Author SHA1 Message Date
Piotr Esden-Tempski f4ff8f7630 Improved JEDEC ID read function.
The function now checks how long the extended JEDEC ID field is for the
particular FLASH chip and only reads the amount provided by the chip.
2018-08-18 15:26:37 -07:00
Piotr Esden-Tempski 3ba1acf31b Replaced some more magic numbers with FLASH command IDs.
I missed those the first time around.
2018-08-18 14:46:12 -07:00
Piotr Esden-Tempski ee7eae0be8 Added easier to read chip_select/reset functions.
Just calling a gpio function with two numbers was not very self
explanatory. The functions now refer to the actual indended action, chip
(de)select for flash, reset and chip (de)select for sram. Reading the
code and understanding what steps are taken should be easier now.
2018-08-18 14:41:42 -07:00
Piotr Esden-Tempski 96b1a90f28 Added more code comments.
Main point was to group the code into three logical segments:
* MPSSE/FTDI defines and functions
* FLASH defines and functions
* iceprog implementation core

While I was at it I also added a few comments for stuff that was not
immediately obvious what it does.
2018-08-16 14:22:53 -07:00
Clifford Wolf ea9553a215
Merge pull request #144 from daveshah1/unbrick
Add write protection disable to iceprog
2018-05-30 13:01:21 +02:00
Piotr Esden-Tempski a7ab72dd4c Added some flash command definitions to decrease magic number usage. 2018-03-11 19:42:06 -07:00
Piotr Esden-Tempski 43333aa0a9 Added some MPSSE command definitions to decrease magic number usage. 2018-03-11 19:41:55 -07:00
David Shah e5e09ee722 Add write protection disable to iceprog 2018-02-12 18:58:19 +00:00
David Shah 9ac405f98f Add out-of-the-box FT232H support (for Upduino 2, etc) 2018-02-09 12:25:48 +00:00
Clifford Wolf bca8c3c88f Add "iceprog -e" 2018-01-02 17:12:44 +01:00
Larry Doolittle b3d35ccadc Squelch trailing whitespace 2017-08-01 14:43:15 +02:00
Robert Ou 4e653c3b7e iceprog: Make errors print only the program name
Previously, the entire argv[0] would be printed.
2017-07-17 01:43:27 -07:00
Robert Ou 9acaac752a iceprog: Do not use nonstandard err.h
This header does not exist under MinGW. Replace these functions with
standard functions.
2017-07-17 01:28:59 -07:00
Clifford Wolf 3c42bdbf66 Fix coding style in iceprog.c (mostly line breaks and indenting) 2017-07-05 18:34:57 +02:00
Roland Lutz 53a8bcce35 iceprog: Keep name space clean 2017-07-04 18:21:54 +02:00
Roland Lutz 62e7089710 iceprog: Remove trailing newline 2017-07-04 18:21:54 +02:00
Roland Lutz f36652689f iceprog: Break overlong lines 2017-07-04 18:21:54 +02:00
Roland Lutz 64e129bee9 iceprog: Fix coding style inconsistencies 2017-07-04 18:21:54 +02:00
Roland Lutz 0a8d98f36a iceprog: Fix error messages 2017-07-04 18:21:54 +02:00
Roland Lutz eef1731d2b iceprog: Return a meaningful exit status 2017-07-02 14:56:07 +02:00
Roland Lutz 7b97eb4177 iceprog: When reading, don't write more bytes than requested 2017-07-02 14:56:07 +02:00
Roland Lutz 8413b2c689 iceprog: Allow programming from pipe 2017-07-02 14:56:07 +02:00
Roland Lutz 0bd8876d7f iceprog: Allow programming from standard input 2017-07-02 14:49:37 +02:00
Roland Lutz 47c9cd4ac1 iceprog: Open input/output files before talking to hardware 2017-07-02 14:49:37 +02:00
Roland Lutz 6741d93245 iceprog: Overhaul `--help' text 2017-07-02 14:49:37 +02:00
Roland Lutz 703a913bd1 iceprog: Add option `--help' 2017-07-02 14:49:37 +02:00
Roland Lutz 86af65cc32 iceprog: Check for non-applicable options 2017-06-19 20:37:44 +02:00
Roland Lutz 90381332e2 iceprog: Check for invalid offset/size arguments 2017-06-08 21:01:45 +02:00
Roland Lutz dbdc65b65b iceprog: Give more information about invocation errors 2017-06-08 21:01:45 +02:00
Salvador E. Tropea 08d2c63485 Reduced the timer latency to 1 (minimum allowed) some users are reporting better results 2017-05-03 12:57:22 -03:00
Salvador E. Tropea 05f0f33c1c Added code to restore the original timer latency. In this way the user can avoid 500 Hz interrupts. 2017-05-03 10:25:09 -03:00
Salvador E. Tropea 73fffc21fa Added a call to ftdi_set_latency_timer to make iceprog performance independent of system settings 2017-05-03 10:08:26 -03:00
Clifford Wolf 1b7253ade2 Added missing #include <stdlib.h> to iceprog.c 2016-05-16 12:03:40 +02:00
Clifford Wolf 58a2aa2617 Improvements in iceprog 2016-05-04 15:48:03 +02:00
Ben Pye 3587093560 Fix iceprog on Windows opening binary in text mode 2016-03-27 22:14:16 +01:00
Clifford Wolf b9e6d07e9c Added config.mk, correct DESTDIR/PREFIX usage 2015-12-31 12:05:04 +01:00
Clifford Wolf 2696346d6c Fixed very long usleep in iceprog flash_wait() 2015-12-08 12:34:05 +01:00
Clifford Wolf 3e478a4f5c Revert "iceprog: Print help with a single fprintf call"
This reverts commit 33c1a3ea5a.

Conflicts:
	iceprog/iceprog.c
2015-10-21 00:54:32 +02:00
Joel Holdsworth c3617cca3d iceprog: Added support for reading/writing data to pipes 2015-10-17 11:11:02 -06:00
Joel Holdsworth 33c1a3ea5a iceprog: Print help with a single fprintf call 2015-10-17 11:08:38 -06:00
Joel Holdsworth dbe71cd7c3 iceprog: Print status messages into stderr 2015-10-17 10:49:57 -06:00
Clifford Wolf 48154cb6f4 Imported full dev sources 2015-07-18 13:10:40 +02:00
Clifford Wolf 13e63e6b65 Import of icestorm-snapshot-150526.zip 2015-07-18 13:07:39 +02:00