The CLI for the TL866 (https://gitlab.com/DavidGriffith/minipro) now compiles and runs natively on Windows. I used the gcc that comes with strawberry perl:
D:\Source\minipro>gcc --version
gcc (x86_64-posix-seh, Built by strawberryperl.com project) 8.3.0
Copyright (C) 2018 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.
Run make:
D:\Source\minipro>make
gcc -g -O0 -Wall -std=c99 -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o xml.o xml.c
gcc -g -O0 -Wall -std=c99 -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o jedec.o jedec.c
gcc -g -O0 -Wall -std=c99 -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o ihex.o ihex.c
gcc -g -O0 -Wall -std=c99 -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o srec.o srec.c
gcc -g -O0 -Wall -std=c99 -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o database.o database.c
gcc -g -O0 -Wall -std=c99 -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o minipro.o minipro.c
gcc -g -O0 -Wall -std=c99 -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o tl866a.o tl866a.c
gcc -g -O0 -Wall -std=c99 -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o tl866iiplus.o tl866iiplus.c
gcc -g -O0 -Wall -std=c99 -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o version.o version.c
gcc -g -O0 -Wall -std=c99 -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o usb_win.o usb_win.c
gcc -g -O0 -Wall -std=c99 -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o main.o main.c
gcc xml.o jedec.o ihex.o srec.o database.o minipro.o tl866a.o tl866iiplus.o version.o usb_win.o main.o -lsetupapi -lwinusb -o minipro
Test:
D:\Source\minipro>minipro -p 2764A@DIP28 -w total.hex
Found TL866II+ 04.2.123 (0x27b)
Warning: Firmware is newer than expected.
Expected 04.2.122 (0x27a)
Found 04.2.123 (0x27b)
VPP=12V, VDD=5.5V, VCC=5V, Pulse=1000us
Chip ID OK: 0x8908
Found Intel hex file.
Writing Code... 28.98Sec OK
Reading Code... 0.21Sec OK
Verification OK
The CLI for the TL866 (https://gitlab.com/DavidGriffith/minipro) now compiles and runs natively on Windows. I used the gcc that comes with strawberry perl:
D:\Source\minipro>gcc --version
gcc (x86_64-posix-seh, Built by strawberryperl.com project) 8.3.0
Copyright (C) 2018 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.
Run make:
D:\Source\minipro>make
gcc -g -O0 -Wall -std=c99 -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o xml.o xml.c
[code]
D:\Source\minipro>minipro -p 2764A@DIP28 -w total.hex
Found TL866II+ 04.2.123 (0x27b)
Warning: Firmware is newer than expected.
Expected 04.2.122 (0x27a)
Found 04.2.123 (0x27b)
VPP=12V, VDD=5.5V, VCC=5V, Pulse=1000us
Chip ID OK: 0x8908
Found Intel hex file.
Writing Code... 28.98Sec OK
Reading Code... 0.21Sec OK
Verification OK
hmm my compile under windows fails on jedec.o ... so something has changed:
C:\Users\Kris\Documents\MiniPro\minipro>make
process_begin: CreateProcess(NULL, which git, ...) failed.
Makefile:31: pipe: No error
process_begin: CreateProcess(NULL, which git, ...) failed.
Makefile:188: pipe: No error
"Creating version.h"
"#define GIT_BRANCH \""ormat:D | sed s/^.*\>\\s*//\"" >> version.h
"#define GIT_HASH \""ormat:H\"" >> version.h
"#define GIT_HASH_SHORT \""ormat:h\"" >> version.h
"#define GIT_DATE \""ormat:ci\"" >> version.h
"Creating version.c"
gcc -g -O0 -Wall -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o xml.o xml.c
gcc -g -O0 -Wall -DSHARE_INSTDIR="\"/usr/local/share/minipro\"" -c -o jedec.o jedec.c
In file included from jedec.c:25:
version.h:1:1: error: expected identifier or '(' before string constant
"/*"
^~~~
C:\Users\Kris\Documents\MiniPro\minipro>gcc --version
gcc (x86_64-posix-seh, Built by strawberryperl.com project) 8.3.0
Copyright (C) 2018 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.
Any chance you can share the compiled binary?
thanks
Kris
thanks, yeah I will need to spend some more time trying to figure it out, but wouldn't mind grabbing a compiled binary for windows if anyone has it already...
Once again I fall for the trickery of 'make'! When make runs on Windows it looks for a Linux/Unix shell in the path; if it finds it, it will use it instead of the 'cmd' of Windows. It so happens that I have Cygwin installed, so make uses that shell (I think is 'bash') where all the wonderful commands used by the 'makefile' all located. That is why the 'makefile' worked so nicely in my system. Try running the attached .bat file (rename from .txt to .bat as .bat files are not permitted in this forum). It creates the two version files (version.h and version.c) compiles all the source files using GCC, and links to minipro.exe. I think it just needs GCC installed. This is the output:
D:\Source\minipro2>makeminipro
D:\Source\minipro2>gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o xml.o xml.c
D:\Source\minipro2>gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o jedec.o jedec.c
D:\Source\minipro2>gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o ihex.o ihex.c
D:\Source\minipro2>gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o srec.o srec.c
D:\Source\minipro2>gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o database.o database.c
D:\Source\minipro2>gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o minipro.o minipro.c
D:\Source\minipro2>gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o tl866a.o tl866a.c
D:\Source\minipro2>gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o tl866iiplus.o tl866iiplus.c
D:\Source\minipro2>gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o version.o version.c
D:\Source\minipro2>gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o usb_win.o usb_win.c
D:\Source\minipro2>gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o main.o main.c
D:\Source\minipro2>gcc xml.o jedec.o ihex.o srec.o database.o minipro.o tl866a.o tl866iiplus.o version.o usb_win.o main.o -lsetupapi -lwinusb -o minipro
This is the batch file, based on the source collected from the repository the day of this posting:
:: Create version.c
@echo /* > version.c
@echo * This file is automatically generated. Do not edit. >> version.c
@echo */ >> version.c
@echo #include "minipro.h" >> version.c
@echo #include "version.h" >> version.c
:: Create version.h
@echo /* > version.h
@echo * This file is automatically generated. Do not edit. >> version.h
@echo */ >> version.h
@echo #define VERSION "0.5" >> version.h
@echo #define GIT_BRANCH " master, refs/keep-around/f5d979a215b4c44e8f23dce918b283a9d7db4d72" >> version.h
@echo #define GIT_HASH "f5d979a215b4c44e8f23dce918b283a9d7db4d72" >> version.h
@echo #define GIT_HASH_SHORT "f5d979a" >> version.h
@echo #define GIT_DATE "2021-01-03 14:04:08 -0800" >> version.h
gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o xml.o xml.c
gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o jedec.o jedec.c
gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o ihex.o ihex.c
gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o srec.o srec.c
gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o database.o database.c
gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o minipro.o minipro.c
gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o tl866a.o tl866a.c
gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o tl866iiplus.o tl866iiplus.c
gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o version.o version.c
gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o usb_win.o usb_win.c
gcc -g -O0 -Wall -DSHARE_INSTDIR="." -c -o main.o main.c
gcc xml.o jedec.o ihex.o srec.o database.o minipro.o tl866a.o tl866iiplus.o version.o usb_win.o main.o -lsetupapi -lwinusb -o minipro
avrkris if you try this, please let us know how it goes. I hadn't check if 'minipro.exe' actually works (I need to find my TL866II first!)
UPDATE: it works:
D:\Source\minipro2>minipro -p 2764A@DIP28 -w total.hex
Found TL866II+ 04.2.123 (0x27b)
VPP=12V, VDD=5.5V, VCC=5V, Pulse=1000us
Chip ID OK: 0x8908
Found Intel hex file.
Writing Code... 28.78Sec OK
Reading Code... 0.19Sec OK
Verification OK
D:\Source\minipro2>where minipro.exe
D:\Source\minipro2\minipro.exe