dediprogsw / sf100linux Goto Github PK
View Code? Open in Web Editor NEWLinux software for SF100/SF600
License: GNU General Public License v2.0
Linux software for SF100/SF600
License: GNU General Public License v2.0
It looks like all dediprogs have to start and stop at the same time. You can't launch multiple copies of dpcmd to program boards with different USB Index's. So programming multiple devices that start independently is not OK.
Found a compile error related linker "undefined reference to timestub". Anybody can suggest solutions.
The chip is detected on Windows but fails on Linux:
dpcmd --check
DpCmd Linux 1.14.18.12 Engine Version:
Last Built on Dec 15 2023
1, SF629534
Programmer type : SF600Plus
Firmware version : 7.3.08
FPGA version : 0x1020
Hardware version : 2.3
./dpcmd --detect --log /tmp/log.txt
DpCmd Linux 1.14.19.12 Engine Version:
Last Built on Dec 22 2023
Device 1 (SF629534): detecting chip
Error: chip not identified or chip is not supported.
cat /tmp/log.txt
2023-Dec-22 18:31:28 USB communication = PASS
2023-Dec-22 18:31:41 Unknow Fail
This issue is created to check if the enhancement made to support multiple dediprog device support under linux environment.
Currently, dpcmd provides environment variables DPCMD_USB_BUSNUM and DPCMD_USB_DEVNUM to identify the dediprog device when multiple dediprog devices are connected.
But We face a problem that when the linux host where dediprog devices are connected are disturbed or restarted, the USB BUS DEVICe number changed for particular dediprog device. It is not fixed.
If possible please implement, identifying dediprog device using Serial Number instead of BUS DEV numbers, this is implemented in em100 linux software, similar kind of implementation would be helpful here.
DpCmd Linux 1.11.2.01 Engine Version:
Last Built on May 25 2018
By reading the chip ID, the chip applies to [ W25Q128BV ]
W25Q128BV parameters to be applied by default
W25Q128BV chip size is 16777216 bytes.
Loading file, please wait ...(LICENSE)
Auto Sequences, please wait ...
Device 1 (DP106264):
Warning: Failed to detect flash (0).
0.299534 s elapsed
Device 1 (DP106264):
Error: Automatic program Failed
Hi,
I tried to compile and got a lot of C99 errors:
osboxes@osboxes:~/SF100Linux-master$ sudo make
gcc -Os -Wall -lpthread -c -o dpcmd.o dpcmd.c
dpcmd.c: In function ‘main’:
dpcmd.c:683:4: error: ‘for’ loop initial declarations are only allowed in C99 mode
dpcmd.c:683:4: note: use option -std=c99 or -std=gnu99 to compile your code
dpcmd.c: In function ‘ExitProgram’:
dpcmd.c:749:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
dpcmd.c: In function ‘sin_handler’:
dpcmd.c:966:17: warning: unused variable ‘basetv’ [-Wunused-variable]
dpcmd.c: In function ‘Handler’:
dpcmd.c:1023:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
dpcmd.c: In function ‘InitProject’:
dpcmd.c:1068:6: error: ‘for’ loop initial declarations are only allowed in C99 mode
dpcmd.c:1082:43: warning: comparison with string literal results in unspecified behavior [-Waddress]
dpcmd.c: In function ‘CloseProject’:
dpcmd.c:1136:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
dpcmd.c: In function ‘DetectChip’:
dpcmd.c:1149:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
dpcmd.c: In function ‘ListTypes’:
dpcmd.c:1245:2: warning: implicit declaration of function ‘Dedi_List_AllChip’ [-Wimplicit-function-declaration]
dpcmd.c: In function ‘BlinkProgrammer’:
dpcmd.c:1258:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
dpcmd.c: In function ‘ListSFSerialID’:
dpcmd.c:1289:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
dpcmd.c: In function ‘do_DisplayOrSave’:
dpcmd.c:1363:6: error: ‘for’ loop initial declarations are only allowed in C99 mode
dpcmd.c: In function ‘do_RawInstructinos_2’:
dpcmd.c:1484:19: warning: unused variable ‘Length’ [-Wunused-variable]
dpcmd.c: In function ‘do_RawInstructions’:
dpcmd.c:1554:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
dpcmd.c: In function ‘Read’:
dpcmd.c:1598:9: warning: unused variable ‘dev_cnt’ [-Wunused-variable]
dpcmd.c: In function ‘CalChecksum’:
dpcmd.c:1637:10: error: ‘for’ loop initial declarations are only allowed in C99 mode
dpcmd.c:1647:7: warning: format ‘%zX’ expects argument of type ‘size_t’, but argument 2 has type ‘unsigned int’ [-Wformat]
dpcmd.c:1647:7: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
dpcmd.c:1670:10: warning: format ‘%zX’ expects argument of type ‘size_t’, but argument 2 has type ‘unsigned int’ [-Wformat]
dpcmd.c:1670:10: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
dpcmd.c: In function ‘Wait’:
dpcmd.c:1722:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
dpcmd.c: In function ‘FlashIdentifier’:
dpcmd.c:1752:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
dpcmd.c:1755:6: warning: implicit declaration of function ‘SendFFSequence’ [-Wimplicit-function-declaration]
dpcmd.c:1759:13: warning: implicit declaration of function ‘Dedi_Search_Chip_Db’ [-Wimplicit-function-declaration]
dpcmd.c: At top level:
Macro.h:376:26: warning: ‘crc32_tab’ defined but not used [-Wunused-variable]
make: *** [dpcmd.o] Error 1
osboxes@osboxes:~/SF100Linux-master$
So I added -std=c99 to the makefile. But I still get errors:
osboxes@osboxes:~/SF100Linux-master$ make
gcc -Os -Wall -lpthread -std=c99 -o dpcmd dpcmd.o usbdriver.o FlashCommand.o SerialFlash.o parse.o board.o project.o IntelHexFile.o MotorolaFile.o -lusb -lpthread
dpcmd.o: In function `Wait':
dpcmd.c:(.text+0x103e): undefined reference to `timersub'
dpcmd.c:(.text+0x1060): undefined reference to `timersub'
collect2: ld returned 1 exit status
make: *** [dpcmd] Error 1
osboxes@osboxes:~/SF100Linux-master$
Where is timersub supposed to come from? I don't see it defined anywhere.
osboxes@osboxes:~/SF100Linux-master$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.4 LTS
Release: 12.04
Codename: precise
osboxes@osboxes:~/SF100Linux-master$
In order to get things working I had to do the following
sudo make install
and
sudo udevadm control --reload
Could you update the readme with appropriate instructions?
Compiling on Ubuntu 16.04 LTS with:
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2)
I get the attached warnings.
make.txt
Ubuntu 16.04.3
$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.6) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ make
gcc -Os -Wall -lpthread -c -o dpcmd.o dpcmd.c
In file included from dpcmd.c:7:0:
usbdriver.h:7:17: fatal error: usb.h: No such file or directory
compilation terminated.
: recipe for target 'dpcmd.o' failed
make: *** [dpcmd.o] Error 1
Replace #include <usb.h> with #include <libusb-1.0/libusb.h> results in the following:
$ make
gcc -Os -Wall -lpthread -c -o dpcmd.o dpcmd.c
In file included from dpcmd.c:7:0:
usbdriver.h:33:23: error: field ‘usb_device_handler’ has incomplete type
struct usb_device usb_device_handler;
^
dpcmd.c: In function ‘GetConfigVer’:
dpcmd.c:476:10: warning: implicit declaration of function ‘strtol’ [-Wimplicit-function-declaration]
Ver = strtol(tok,NULL,10);
^
dpcmd.c: In function ‘ExitProgram’:
dpcmd.c:741:13: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration]
free(pBufferForLastReadData[i]);
^
dpcmd.c:741:13: warning: incompatible implicit declaration of built-in function ‘free’
dpcmd.c:741:13: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
dpcmd.c:745:10: warning: incompatible implicit declaration of built-in function ‘free’
free(pBufferforLoadedFile);
^
dpcmd.c:745:10: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
dpcmd.c: In function ‘sin_handler’:
dpcmd.c:951:17: warning: unused variable ‘basetv’ [-Wunused-variable]
struct timeval basetv[3];
^
dpcmd.c: In function ‘Handler’:
dpcmd.c:961:8: warning: implicit declaration of function ‘Is_usbworking’ [-Wimplicit-function-declaration]
if(Is_usbworking(0)==true)
^
dpcmd.c: In function ‘ListTypes’:
dpcmd.c:1219:2: warning: implicit declaration of function ‘Dedi_List_AllChip’ [-Wimplicit-function-declaration]
Dedi_List_AllChip();
^
dpcmd.c: In function ‘Read’:
dpcmd.c:1519:9: warning: unused variable ‘dev_cnt’ [-Wunused-variable]
int dev_cnt=get_usb_dev_cnt();
^
dpcmd.c: In function ‘CalChecksum’:
dpcmd.c:1569:14: warning: format ‘%zX’ expects argument of type ‘size_t’, but argument 2 has type ‘unsigned int’ [-Wformat=]
printf("Checksum of the whole chip(address starting from: 0x%zX, 0x%X byt
^
dpcmd.c:1569:14: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
dpcmd.c:1592:17: warning: format ‘%zX’ expects argument of type ‘size_t’, but argument 2 has type ‘unsigned int’ [-Wformat=]
printf("Checksum of the whole chip(address starting from: 0x%zX, 0x%X
^
dpcmd.c:1592:17: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
dpcmd.c: In function ‘FlashIdentifier’:
dpcmd.c:1678:14: warning: implicit declaration of function ‘Dedi_Search_Chip_Db’ [-Wimplicit-function-declaration]
rc = Dedi_Search_Chip_Db(0x9f, UniqueID, Chip_Info, search_all,Index);
^
: recipe for target 'dpcmd.o' failed
make: *** [dpcmd.o] Error 1
Sometime it is 500 seconds(Win GUI) to 50 seconds(Linux), is it possible to align with the fast one?
DpCmd Linux 1.11.2.01 Engine Version:
Last Built on May 25 2018
By reading the chip ID, the chip applies to [ W25Q256FV ]
W25Q256FV parameters to be applied by default
W25Q256FV chip size is 33554432 bytes.
Loading file, please wait ...(LICENSE)
Auto Sequences, please wait ...
Device 1 (DP106264):
Warning: Failed to detect flash (0).
0.291188 s elapsed
Device 1 (DP106264):
Error: Automatic program Failed
Attached is the info I got from the Windows Dediprog software.
I assume the type of "S25HL512T" should be recognized under Linux. But I got the following error.
`sudo ./dpcmd -d
[sudo] password for dwang:
DpCmd Linux 1.14.20.12 Engine Version:
Last Built on Jan 25 2024
Device 1 (S6B00364): detecting chip
Error: chip not identified or chip is not supported.
`
How can I make it recognizable? Thanks!
Dear Evy, the problem has changed but not resolved
~/projects/SF100Linux/dpcmd -r ~/bin/boot_flash
DpCmd Linux 1.12.8.05 Engine Version:
Last Built on October 27 2021
By reading the chip ID, the chip applies to [ N25Q512A13 N25Q512A83 MT25QL512A(Secure) MT25QL512A MT25QL512ABA8ESFE01-2SIT MT25TL512B MT25TL512H MT25TL01GB MT25TL01GB ]
N25Q512A13 parameters to be applied by default
N25Q512A13 chip size is 67108864 bytes.
Reading, please wait ...
Device 1 (DP118406):
100.2s elapsed
Device 1 (DP118406):
Read OK
Successfully saved into file:_1
Originally posted by @gluhow in #44 (comment)
WTF IS GOING ON?!?! Hello, dear friends!
I'm using DEDIPROG SF100 and I've burned already 2 motherboards got some troubles with switching to 1.8V for my MT25QU256ABA. It is a low power SPI Flash chip, and it is in the “ChipInfoDb.dedicfg” with the right value for voltage (1.8 V). But the programmer uses 3.5 V while detection and during communication with it. I’ve already tried explicitly add “-c MT25QU256ABA” and even used “--vcc 2” which stands for 1.8 V mode. But unfortunately I’ve got the same result (3.5 V of output). I’ve even tried to hard-code “unsigned int g_Vcc = vcc1_8V;” but it didn’t help either.
The programmer’s firmware is the latest (6.5.03).
Windows flash program detects chip right and uses right voltage (checked with oscilloscope).
Hope this information will be helpful for somebody.
Product website: https://www.gigadevice.com/flash-memory/gd25lq16e/
Datasheet: https://www.gigadevice.com/datasheet/gd25lq16e/
W77Q128JWSIQ is not in the list of Linux dpcmd. But it is supported in Windows version.
Could you please help to add it to Linux version?
Hi DediProg Linux developers @DediprogEvy ,
We saw the windows GUI version has this write status register function and we found this is super useful when a bad firmware binary got flashed into a board and write protection is thus triggered for the ROM. Basically we can use this function to unlock the protection and overwrite the binary stored in the ROM.
Do we have something similar in the linux cmdline tool or if not, could we have one?
Thanks,
Jarvis
Hi,
I got error when DpCmd image with SF600 at ubuntu enviroment.
[175246.904807] usb 1-3.4: device descriptor read/64, error -32
[175247.092750] usb 1-3.4: device descriptor read/64, error -32
[175247.280818] usb 1-3.4: new full-speed USB device number 22 using ehci-pci
[175247.360820] usb 1-3.4: device descriptor read/64, error -32
[175247.548804] usb 1-3.4: device descriptor read/64, error -32
[175247.656894] usb 1-3-port4: attempt power cycle
[175248.264784] usb 1-3.4: new full-speed USB device number 23 using ehci-pci
[175248.680775] usb 1-3.4: device not accepting address 23, error -32
[175248.760763] usb 1-3.4: new full-speed USB device number 24 using ehci-pci
[175249.176757] usb 1-3.4: device not accepting address 24, error -32
[175249.176900] usb 1-3-port4: unable to enumerate USB device
[175819.170708] usb 2-4.2: USB disconnect, device number 5
[175938.925344] usb 2-4.2: new high-speed USB device number 6 using ehci-pci
[175939.058811] usb 2-4.2: New USB device found, idVendor=0483, idProduct=dada
[175939.058815] usb 2-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[175939.058818] usb 2-4.2: Product: SF600-ISP
[175939.058820] usb 2-4.2: Manufacturer: SF600-ISP
[175939.058823] usb 2-4.2: SerialNumber: 20101207-0000
[241910.618450] usb 2-4.2: USB disconnect, device number 6
[241919.357452] usb 4-2: USB disconnect, device number 2
[241939.188927] usb 7-1: new low-speed USB device number 2 using uhci_hcd
[241939.378057] usb 7-1: New USB device found, idVendor=0461, idProduct=4d22
[241939.378061] usb 7-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[241939.378064] usb 7-1: Product: USB Optical Mouse
[241939.393448] input: USB Optical Mouse as /devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/0003:0461:4D22.0004/input/input17
[241939.394083] hid-generic 0003:0461:4D22.0004: input,hidraw0: USB HID v1.11 Mouse [USB Optical Mouse] on usb-0000:00:1d.1-1/input0
[241956.384547] usb 1-4: new high-speed USB device number 26 using ehci-pci
[241956.545961] usb 1-4: New USB device found, idVendor=0483, idProduct=dada
[241956.545966] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[241956.545968] usb 1-4: Product: SF600-ISP
[241956.545971] usb 1-4: Manufacturer: SF600-ISP
[241956.545973] usb 1-4: SerialNumber: 20101207-0000
solon@solon-Precision-WorkStation-T5500:/Tool/DediProg/SF100Linux-master$ sudo ./dpcmd --auto ../rom.ima --verify/Tool/DediProg/SF100Linux-master$ sudo ./dpcmd --auto ../rom.ima --verify
rom.ima SF100Linux-master/ SF100Linux-master.zip
solon@solon-Precision-WorkStation-T5500:
rom.ima SF100Linux-master/ SF100Linux-master.zip
solon@solon-Precision-WorkStation-T5500:~/Tool/DediProg/SF100Linux-master$ sudo ./dpcmd --auto ../rom.ima --verify
DpCmd Linux 1.11.3.03 Engine Version:
Last Built on May 25 2018
Control Pipe input error!
Error: Operation timed out
Control Pipe input error!
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Error: Operation timed out
Linux SF100 does not detect GigaDevice GD25LB256E chip, but Windows program can detect. Please help to update linux program.
DpCmd Linux 1.12.10.06 Engine Version:
Last Built on October 27 2021
Device 1 (SF619853): detecting chip
Error: chip not identified.
We used DediProg Eng on Windows. When I run "Detect" on Windows, I get the message, that the chip can not be detected exactly and the Windows tool shows me two alternatives. For example:
I have to use the W25Q64FW.
When I do the same with the Linux command line tool, it shows only the DW version:
$ sudo ./dpcmd -d
DpCmd Linux 1.11.1.07 Engine Version:
Last Built on May 25 2018
Device 1 (SF600001): detecting chip
By reading the chip ID, the chip applies to [ W25Q64DW ]
W25Q64DW chip size is 8388608 bytes.
And the W25Q64DW is wrong, because I have to use the W25Q64FW.
The dpcmd has stopped working on my Ubuntu 20.04 machine since the following commit
commit e556c12 (HEAD)
Author: Stefan Reinauer [email protected]
Date: Fri Nov 20 16:12:32 2020 -0800
Migrate dpcmd to libusb-1.0
The USB code in usbdriver.c was originally written for the now
unsupported libusb-0.1 library. Port to the newer API of libusb-1.0
to make it easier to compile for newer Linux distributions.
Signed-off-by: Stefan Reinauer <[email protected]>
The symptoms are that the first command works and then it fails to even detect the device thereafter.
Here's an example where it the verify fails because it can't detect the flash device. Any subsequent command fails with the same error until I power reset the DediProg. It's a DediProg SF100
sudo dpcmd --auto ./factory.bin --addr 0x80000 --verify
DpCmd Linux 1.11.2.01 Engine Version:
Last Built on May 25 2018
Control Pipe input error!
By reading the chip ID, the chip applies to [ MX66L51235F ]
MX66L51235F parameters to be applied by default
MX66L51235F chip size is 67108864 bytes.
Loading file, please wait ...(./factory.bin)
Auto Sequences, please wait ...
0.6s elapsed
Device 1 (DP115332):
Automatic program OK
Checksum(whole file): 01AB8FCE
Checksum(Written part of file): 01AB8FCE
Verifying, please wait ...
0.1s elapsedWarning: Failed to detect flash (0).
Device 1 (DP115332):
Error: Verify Failed
Hello,
In Windows DpCmd version 7.2.0.17, a new feature has been added that "DpCmd --device-SN" directly specify the serial number function of the programmer. The same needs to be included in Linux Dpcmd version.
Thanks,
Muthu.
I'm attempting to flash a MT25QL512ABB8ESF with the latest dpcmd (cloned and built myself).
I'm not able to do much beyond detect it. Simple commands like erase fails:
$ dpcmd --detect --log /tmp/dpcmd.txt
DpCmd Linux 1.12.8.05 Engine Version:
Last Built on October 27 2021
Device 1 (SF610660): detecting chip
By reading the chip ID, the chip applies to [ N25Q512A13 N25Q512A83 MT25QL512A(Secure) MT25QL512A MT25QL512ABA8ESFE01-2SIT MT25TL512B MT25TL512H MT25TL01GB MT25TL01GB ]
N25Q512A13 chip size is 67108864 bytes.
Attempt to erase always fails (ditto pretty much any other command):
$ dpcmd -e --type MT25QL512A --log /tmp/dpcmd.txt
DpCmd Linux 1.12.8.05 Engine Version:
Last Built on October 27 2021
Chip Type MT25QL512A is applied manually.
MT25QL512A chip size is 67108864 bytes.
Erasing, please wait ...
Device 1 (SF610660):
1.4s elapsedWarning: Failed to detect flash (0).
1.6s elapsed
Device 1 (SF610660):
Error: Erase Failed
There's not much useful data in in the logs:
2021-Dec-15 16:45:49 USB communication = PASS
2021-Dec-15 16:45:51 Erase Fail
Picture of setup:
Hello,
I am trying writing to Flash status register through SF100 to W25Q256FV flash memory chip.
There is a write enable command to send first , command is 06 and it is not expecting to return an answer.
So I am sending :
sudo ./dpcmd --raw-instruction "06"
DpCmd Linux 1.11.2.01 Engine Version:
Last Built on May 25 2018
By reading the chip ID, the chip applies to [ W25Q256FV ]
W25Q256FV parameters to be applied by default
W25Q256FV chip size is 33554432 bytes.
Device 1:
issuing raw instruction "0x06" returns 97 bytes as required:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 00 01 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SR=0x00
I don't understand why it returns 97 bytes, is this correct ? We were thinking this was just a raw-instruction command so no bytes to return.
We are following procedure to increase output driver strength by issuing sequence :
thank you
Linux SF100 does not detect Winbond 25Q512JVFQ chip, but Windows SF100 program can detect. Please help to update linux program.
I have MT25QL512A and SF100.
I run from UBUNTU 21.10
./dpcmd -e
DpCmd Linux 1.12.7.05 Engine Version:
Last Built on October 27 2021
By reading the chip ID, the chip applies to [ N25Q512A13 N25Q512A83 MT25QL512A(Secure) MT25QL512A MT25QL512ABA8ESFE01-2SIT MT25TL512B MT25TL512H MT25TL01GB MT25TL01GB ]
N25Q512A13 parameters to be applied by default
N25Q512A13 chip size is 67108864 bytes.
Erasing, please wait ...
Device 1 (DP118406):
0.7s elapsed
Device 1 (DP118406):
Erase OK
0.7s!
./dpcmd -b
DpCmd Linux 1.12.7.05 Engine Version:
Last Built on October 27 2021
By reading the chip ID, the chip applies to [ N25Q512A13 N25Q512A83 MT25QL512A(Secure) MT25QL512A MT25QL512ABA8ESFE01-2SIT MT25TL512B MT25TL512H MT25TL01GB MT25TL01GB ]
N25Q512A13 parameters to be applied by default
N25Q512A13 chip size is 67108864 bytes.
Checking, please wait ...
Device 1 (DP118406):
100.1s elapsed
Device 1 (DP118406):
The chip is NOT blank
Tried building the binary on an x86_64 Ubuntu laptop with:
Make 4.3, GCC 11.4.0
Found that libusb
was not getting linked correctly. Added the following line to the Makefile to get it to work:
diff --git a/Makefile b/Makefile
index 139e5c0..9bac300 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@ CFLAGS += $(shell $(PKG_CONFIG) --cflags libusb-1.0)
LDFLAGS ?=
LDFLAGS += -lpthread
+LDFLAGS += -lusb-1.0
LDFLAGS += $(shell $(PKG_CONFIG) --libs libusb-1.0)
DEPDIR := .deps
I cannot compile the tool on ubuntu 22.04
when i try to compile i get an error that libusb.h cannot be found:
peter:/media/peter/data/code/SF100Linux(master)$ make
make: pkg-config: No such file or directory
CC dpcmd.o
In file included from dpcmd.c:7:
usbdriver.h:6:10: fatal error: libusb.h: No such file or directory
6 | #include <libusb.h>
| ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:44: dpcmd.o] Error 1
peter:/media/peter/data/code/SF100Linux(master)$
peter:/media/peter/data/code/SF100Linux(master)$
peter:/media/peter/data/code/SF100Linux(master)$ git log
commit f5646a6 (HEAD -> master, origin/master, origin/HEAD)
Author: Evy liu [email protected]
Date: Tue Feb 15 10:28:54 2022 +0800
Update usbdriver.c
I have installed libusb:
libusb-0.1-4/jammy,now 2:0.1.12-32build3 amd64 [installed]
libusb-1.0-0-dev/jammy,now 2:1.0.25-1ubuntu1 amd64 [installed]
libusb-1.0-0/jammy,now 2:1.0.25-1ubuntu1 amd64 [installed]
libusb-1.0-doc/jammy,jammy,now 2:1.0.25-1ubuntu1 all [installed]
libusb-dev/jammy,now 2:0.1.12-32build3 amd64 [installed]
After latest two commits i have this error with S25FL512Sxxxxxx1x(Secure)
SPI flash:
DpCmd Linux 1.12.11.06 Engine Version:
Last Built on October 27 2021
Control Pipe input error!
Control Pipe input error!
Control Pipe input error!
Hello -
using "dpcmd --read filename.bin" to read the contents of an SPI flash chip, I'm finding that extra '00' bytes are inserted.
for example, the expected image starts:
00000000 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|
00000010 02 00 28 00 01 00 00 00 90 14 8c 0a 34 00 00 00 |..(.........4...|
but the result from "dpcmd --read" starts:
00000000 00 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 |..ELF...........|
00000010 00 02 00 28 00 01 00 00 00 90 14 8c 0a 34 00 00 |...(.........4..|
(note the leading '00' - there are others interspersed in the image too)
using the "flashrom" utility ("flashrom -p dediprog -c W25Q256FV --read filename.bin"), I don't see this issue
it seems consistent (so far) that "dpcmd" has this issue, but "flashrom" does not.
I've tried lowering the SPI clock rate from default 12MHz to 3MHz - same result
I've looked through the dpcmd options, and can't find anything obvious to try.
do you have any suggestions?
thanks!
When I try to connect the programmer and run the dpcmd -d. I am getting below error:
Error: Programmers USB set configuration: 0xffffffff.
Trying with sudo ./dpcmd I was able to access the device
With binutils 2.34, gcc 10.1.0, following happens during compilation:
...
gcc -Os -Wall -lpthread -D_NON_UBUNTU -o dpcmd dpcmd.o usbdriver.o FlashCommand.o SerialFlash.o parse.o board.o project.o IntelHexFile.o MotorolaFile.o -lusb -lpthread
/usr/bin/ld: usbdriver.o:(.bss+0x20): multiple definition of `usb_device_entry'; dpcmd.o:(.bss+0x7c0): first defined here
/usr/bin/ld: usbdriver.o:(.bss+0x8): multiple definition of `dev_index'; dpcmd.o:(.bss+0x7b4): first defined here
/usr/bin/ld: FlashCommand.o:(.bss+0x0): multiple definition of `dev_index'; dpcmd.o:(.bss+0x7b4): first defined here
/usr/bin/ld: FlashCommand.o:(.bss+0x20): multiple definition of `usb_device_entry'; dpcmd.o:(.bss+0x7c0): first defined here
/usr/bin/ld: SerialFlash.o:(.bss+0x18): multiple definition of `dev_index'; dpcmd.o:(.bss+0x7b4): first defined here
/usr/bin/ld: SerialFlash.o:(.bss+0x20): multiple definition of `usb_device_entry'; dpcmd.o:(.bss+0x7c0): first defined here
/usr/bin/ld: board.o:(.bss+0x4): multiple definition of `dev_index'; dpcmd.o:(.bss+0x7b4): first defined here
/usr/bin/ld: board.o:(.bss+0x20): multiple definition of `usb_device_entry'; dpcmd.o:(.bss+0x7c0): first defined here
/usr/bin/ld: project.o:(.bss+0x100): multiple definition of `dev_index'; dpcmd.o:(.bss+0x7b4): first defined here
/usr/bin/ld: project.o:(.bss+0x120): multiple definition of `usb_device_entry'; dpcmd.o:(.bss+0x7c0): first defined here
/usr/bin/ld: project.o:(.bss+0x10720): multiple definition of `tvUsec'; dpcmd.o:(.bss+0x7a0): first defined here
/usr/bin/ld: project.o:(.bss+0x10728): multiple definition of `tvSec'; dpcmd.o:(.bss+0x7a8): first defined here
/usr/bin/ld: project.o:(.bss+0x10730): multiple definition of `ctrlCCount'; dpcmd.o:(.bss+0x7b0): first defined here
collect2: error: ld returned 1 exit status
make: *** [makefile:21: dpcmd] Error 1
It is probably due to change in behavior of ld (part of binutils) that doesn't accept multiple symbol definitions by default anymore. Possibly can be fixed by pull request #25
OS: Arch (rolling stable, May 19 2020)
SF100Linux 1.2.1.03-31-g7d8be06
I try read flash to file, but pccmdFileName=1_MyFileName
~/projects/SF100Linux/dpcmd -r ~/bin/boot_flash
DpCmd Linux 1.12.7.05 Engine Version:
Last Built on October 27 2021
By reading the chip ID, the chip applies to [ N25Q512A13 N25Q512A83 MT25QL512A(Secure) MT25QL512A MT25QL512ABA8ESFE01-2SIT MT25TL512B MT25TL512H MT25TL01GB MT25TL01GB ]
N25Q512A13 parameters to be applied by default
N25Q512A13 chip size is 67108864 bytes.
Reading, please wait ...
Device 1 (DP118406):
100.1s elapsed
Device 1 (DP118406):
Read OK
1_/home/glukhov/bin/boot_flash: No such file or directory
Failed to save into file: 1_/home/glukhov/bin/boot_flash
Hey, is anyone from DediProgSW maintaining this repository? There are a number of outstanding issues and bugs that have pull-requests for fixes, but none have been merged.
Hi All,
This is the first time I am trying to do dediprog flashing using linux dpcmd. I am getting below error always with any chip. I am not sure what missing here. Can some one help me out on this ?
_sudo ./dpcmd --auto /remote/tmp/WC_ICXOutImage_NM.bin --verify
DpCmd Linux 1.11.3.03 Engine Version:
Last Built on May 25 2018
By reading the chip ID, the chip applies to [ MX25L25635F ]
MX25L25635F parameters to be applied by default
MX25L25635F chip size is 33554432 bytes.
Loading file, please wait ...(/remote/tmp/WC_ICXOutImage_NM.bin)
Auto Sequences, please wait ...
Device 1 (SF618507):
30.5s elapsedError: Operation timed out
60.7s elapsedError: Operation timed out_
This project needs a README.MD with the dependency requirements to make
the project.
It looks like I'm missing at least one package beyond build-essential, I need to know all the others I may or may not be missing.
Please specify under which license this code is distributed. Without any, no one allowed to use it, strictly spoken.
I was trying to update the firmware on my SF600 using the latest 7.3.07 version from https://www.dediprog.com/product/SF600 - was this ever tested on Linux?
diff --git a/dpcmd.c b/dpcmd.c
index 650e372..97476b9 100755
--- a/dpcmd.c
+++ b/dpcmd.c
@@ -919,7 +919,8 @@ int FirmwareUpdate()
}
// obtain file size:
- filesize = fseek(pFile, 0, SEEK_END);
+ fseek(pFile, 0, SEEK_END);
+ filesize = ftell(pFile);
if (filesize < sizeof(FW_INFO)) {
printf("File %s too small.\n", g_parameter_fw);
return -1;
With this fixed, I'm now facing
$ ./dpcmd -U ~/SF600_V7_3_07_F1020.dpfw
DpCmd Linux 1.12.9.06 Engine Version:
Last Built on October 27 2021
Current Firmware is 70202, New Firmware Version is 70307
Error: This firmware for SF600PLUS!
Error: This firmware can not be updated on this programmer!
Is this a real incompatibility of the offered firmware with my non-PLUS device or just an issue of the compatibility check? I don't what to risk bricking the device by skipping the test.
The reason for the update attempt is some instability in communication with USB host: If it undergoes a reboot, the device will not reaction on USB transaction. Only re-plugging it resolves the issue then. This is bad for remote operation which I'm trying to set up.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.