Skip to content

Commit

Permalink
Release version 1.7.7
Browse files Browse the repository at this point in the history
* Add SPI EEPROM 251024
* Add option set page size SPI EEPROM for fast write
* Many fix code
L
  • Loading branch information
McMCCRU committed Dec 5, 2022
1 parent 5b1bd71 commit 6786ecf
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 58 deletions.
Binary file modified Linux/SNANDer
Binary file not shown.
Binary file modified MacOSX/SNANDer.aarch64
Binary file not shown.
Binary file modified MacOSX/SNANDer.x86_64
Binary file not shown.
Binary file modified Windows/SNANDer.exe
Binary file not shown.
3 changes: 2 additions & 1 deletion flash_support_list.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.6 by McMCC <mcmcc_at_mail.ru>
SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.7 by McMCC <mcmcc_at_mail.ru>

SPI NAND Flash Support List:
001. GIGADEVICE GD5F1GQ4UA
Expand Down Expand Up @@ -240,3 +240,4 @@ SPI EEPROM Support List:
008. 25128
009. 25256
010. 25512
011. 251024
45 changes: 34 additions & 11 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.6 by McMCC <mcmcc_at_mail.ru>
SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.7 by McMCC <mcmcc_at_mail.ru>

Usage:
-h display this message
Expand All @@ -9,9 +9,10 @@ SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.6 by McMCC <mcmcc_at_mail.ru>
-i read the chip ID info
-E select I2C EEPROM {24c01|24c02|24c04|24c08|24c16|24c32|24c64|24c128|24c256|24c512|24c1024}
select Microwire EEPROM {93c06|93c16|93c46|93c56|93c66|93c76|93c86|93c96} (need SPI-to-MW adapter)
select SPI EEPROM 25xxx {25010|25020|25040|25080|25160|25320|25640|25128|25256|25512}
select SPI EEPROM 25xxx {25010|25020|25040|25080|25160|25320|25640|25128|25256|25512|251024}
-8 set organization 8-bit for Microwire EEPROM(default 16-bit) and set jumper on SPI-to-MW adapter
-f <addr len> set manual address size in bits for Microwire EEPROM(default auto)
-s <bytes> set page size from datasheet for fast write SPI EEPROM(default not usage)
-e erase chip(full or use with -a [-l])
-l <bytes> manually set length
-a <address> manually set address
Expand All @@ -25,7 +26,7 @@ Examples:

igor@mcmcc-GL553VE:~/Soft/SNANDer-bin/Linux$ ./SNANDer -i

SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.6 by McMCC <mcmcc_at_mail.ru>
SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.7 by McMCC <mcmcc_at_mail.ru>

Found programmer device: WinChipHead (WCH) - CH341A
Device revision is 3.0.4
Expand All @@ -37,7 +38,7 @@ Detected SPI NAND Flash: MXIC MX35LF2G, Flash Size: 256 MB

or

SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.6 by McMCC <mcmcc_at_mail.ru>
SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.7 by McMCC <mcmcc_at_mail.ru>

Found programmer device: Winchiphead (WCH) - CH341A
Device revision is 3.0.4
Expand All @@ -51,7 +52,7 @@ Detected SPI NAND Flash: WINBOND W25N01G, Flash Size: 128 MB

igor@mcmcc-GL553VE:~/Soft/SNANDer-bin/Linux$ ./SNANDer -d -e

SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.6 by McMCC <mcmcc_at_mail.ru>
SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.7 by McMCC <mcmcc_at_mail.ru>

Found programmer device: WinChipHead (WCH) - CH341A
Device revision is 3.0.4
Expand All @@ -72,7 +73,7 @@ igor@mcmcc-GL553VE:~/Soft/SNANDer-bin/Linux$

igor@mcmcc-GL553VE:~/Soft/SNANDer-bin/Linux$ ./SNANDer -d -v -w ecc_2Gb_2K_64_flashimage_rfb1_ac2600.bin

SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.6 by McMCC <mcmcc_at_mail.ru>
SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.7 by McMCC <mcmcc_at_mail.ru>

Found programmer device: WinChipHead (WCH) - CH341A
Device revision is 3.0.4
Expand All @@ -96,7 +97,7 @@ Status: OK

igor@igor-GL553VE:~/Soft/SNANDer-bin/Linux$ ./SNANDer -E 93c46 -r test.bin

SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.6 by McMCC <mcmcc_at_mail.ru>
SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.7 by McMCC <mcmcc_at_mail.ru>

Found programmer device: WinChipHead (WCH) - CH341A
Device revision is 3.0.4
Expand All @@ -113,7 +114,7 @@ Status: OK

igor@igor-GL553VE:~/Soft/SNANDer-bin/Linux$ ./SNANDer -E 93c46 -w test.bin -v

SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.6 by McMCC <mcmcc_at_mail.ru>
SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.7 by McMCC <mcmcc_at_mail.ru>

Found programmer device: WinChipHead (WCH) - CH341A
Device revision is 3.0.4
Expand All @@ -138,18 +139,40 @@ Status: OK

igor@igor-GL553VE:~/Soft/SNANDer-bin/Linux$ ./SNANDer -E 25640 -v -w test.bin

SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.6 by McMCC <mcmcc_at_mail.ru>
SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.7 by McMCC <mcmcc_at_mail.ru>

Found programmer device: WinChipHead (WCH) - CH341A
Device revision is 3.0.4
SPI EEPROM chip: 25640, Size: 8192 bytes
WRITE:
Written addr = 0x0000000000000000, len = 0x0000000000002000
Wrote 100% [8192] bytes to [25640] EEPROM address 0x00000000
Write addr = 0x0000000000000000, len = 0x0000000000002000
Written 100% [8192] bytes to [25640] EEPROM address 0x00000000
Elapsed time: 22 seconds
Status: OK
VERIFY:
Read addr = 0x0000000000000000, len = 0x0000000000002000
Read 100% [8192] bytes from [25640] EEPROM address 0x00000000
Elapsed time: 2 seconds
Status: OK

7. Fast write and verify SPI EEPROM Atmel AT25640B from file with use page size.
(Find out page size from datasheet on chip!!!)

igor@igor-GL553VE:~/Soft/SNANDer-bin/Linux$ ./SNANDer -E 25640 -v -w test.bin -s 32

SNANDer - Serial Nor/nAND/Eeprom programmeR v.1.7.7 by McMCC <mcmcc_at_mail.ru>

Found programmer device: WinChipHead (WCH) - CH341A
Device revision is 3.0.4
SPI EEPROM chip: 25640, Size: 8192 bytes
Setting page size 32B for write.
WRITE:
Write addr = 0x0000000000000000, len = 0x0000000000002000
Written 100% [8192] bytes to [25640] EEPROM address 0x00000000
Elapsed time: 1 seconds
Status: OK
VERIFY:
Read addr = 0x0000000000000000, len = 0x0000000000002000
Read 100% [8192] bytes from [25640] EEPROM address 0x00000000
Elapsed time: 2 seconds
Status: OK
32 changes: 26 additions & 6 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,19 @@ extern char eepromname[12];
extern int eepromsize;
extern int seepromsize;
extern int mw_eepromsize;
extern int spage_size;
extern int org;
#define EHELP " -E select I2C EEPROM {24c01|24c02|24c04|24c08|24c16|24c32|24c64|24c128|24c256|24c512|24c1024}\n" \
" select Microwire EEPROM {93c06|93c16|93c46|93c56|93c66|93c76|93c86|93c96} (need SPI-to-MW adapter)\n" \
" select SPI EEPROM 25xxx {25010|25020|25040|25080|25160|25320|25640|25128|25256|25512}\n" \
" select SPI EEPROM 25xxx {25010|25020|25040|25080|25160|25320|25640|25128|25256|25512|251024}\n" \
" -8 set organization 8-bit for Microwire EEPROM(default 16-bit) and set jumper on SPI-to-MW adapter\n" \
" -f <addr len> set manual address size in bits for Microwire EEPROM(default auto)\n"
" -f <addr len> set manual address size in bits for Microwire EEPROM(default auto)\n" \
" -s <bytes> set page size from datasheet for fast write SPI EEPROM(default not usage)\n"
#else
#define EHELP ""
#endif

#define _VER "1.7.6"
#define _VER "1.7.7"

void title(void)
{
Expand Down Expand Up @@ -94,9 +96,9 @@ int main(int argc, char* argv[])
title();

#ifdef EEPROM_SUPPORT
while ((c = getopt(argc, argv, "diIhveLl:a:w:r:o:E:f:8")) != -1)
while ((c = getopt(argc, argv, "diIhveLl:a:w:r:o:s:E:f:8")) != -1)
#else
while ((c = getopt(argc, argv, "diIhveLl:a:w:r:o:")) != -1)
while ((c = getopt(argc, argv, "diIhveLl:a:w:r:o:s:")) != -1)
#endif
{
switch(c)
Expand Down Expand Up @@ -167,6 +169,10 @@ int main(int argc, char* argv[])
str = strdup(optarg);
OOB_size = strtoll(str, NULL, *str && *(str + 1) == 'x' ? 16 : 10);
break;
case 's':
str = strdup(optarg);
spage_size = strtoll(str, NULL, *str && *(str + 1) == 'x' ? 16 : 10);
break;
case 'a':
str = strdup(optarg);
addr = strtoll(str, NULL, *str && *(str + 1) == 'x' ? 16 : 10);
Expand Down Expand Up @@ -218,10 +224,24 @@ int main(int argc, char* argv[])
printf("Programmer not supported auto detect EEPROM!\n\n");
goto out;
}
if (spage_size) {
if (!seepromsize) {
printf("Use only for SPI EEPROM!\n\n");
goto out;
}
if (((spage_size % 8) != 0) || (spage_size > (MAX_SEEP_PSIZE / 2))){
printf("Invalid parameter %dB for page size SPI EEPROM!\n\n", spage_size);
goto out;
}
if (op == 'r')
printf("Ignored set page size SPI EEPROM on READ.\n");
else
printf("Setting page size %dB for write.\n", spage_size);
}
#else
if (op == 'i') goto out;
#endif
if (op == 'o') {
if (OOB_size) {
if (ECC_fcheck == 1) {
printf("Ignore option -o, use with -d only!\n");
OOB_size = 0;
Expand Down
8 changes: 4 additions & 4 deletions src/snander.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include "res.h"

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1, 7, 6, 0
PRODUCTVERSION 1, 7, 6, 0
FILEVERSION 1, 7, 7, 0
PRODUCTVERSION 1, 7, 7, 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE 0
Expand All @@ -15,11 +15,11 @@ BEGIN
VALUE "FileDescription", "SNANDer - Serial Nor/nAND/Eeprom programmeR\0"
VALUE "OriginalFilename", "SNANDer.exe\0"
VALUE "CompanyName", "-= (c) 2018-2022 Igor Mokrushin aka McMCC =-\0"
VALUE "FileVersion", "1.7.6.0\0"
VALUE "FileVersion", "1.7.7.0\0"
VALUE "InternalName", "SNANDer\0"
VALUE "LegalCopyright", "Copyright (c) 2018-2022 by McMCC <[email protected]>\0"
VALUE "ProductName","SNANDer\0"
VALUE "ProductVersion","1.7.6.0\0"
VALUE "ProductVersion","1.7.7.0\0"
END
END
BLOCK "VarFileInfo"
Expand Down
Loading

0 comments on commit 6786ecf

Please sign in to comment.