f32c / tools

ULX2S / ULX3S FPGA JTAG programmer & tools (Lattice XP2 / ECP5)
22 stars 16 forks source link

Windows ujprog command-line parameter issues #10

Closed gojimmypi closed 5 years ago

gojimmypi commented 5 years ago

specify COM port, and -a *.bit; FAILS to find any files:

C:\workspace-git\f32c_tools\ujprog>ujprog  -P COM9 -a *.bit
ULX2S / ULX3S JTAG programmer v 3.0.92 (built Feb 13 2019 12:27:20)
*.bit: cannot open

specify COM port, and -a [explicit file name]; finds file, completes, FAILS to actually upload file:

C:\workspace-git\f32c_tools\ujprog>ujprog  -P COM9 -a ulx3s.bit
ULX2S / ULX3S JTAG programmer v 3.0.92 (built Feb 13 2019 12:27:20)
Sending ulx3s.bit: done.

do NOT specify COM port, [wildcard file name]: does not find file, FAILS:

C:\workspace-git\f32c_tools\ujprog>ujprog *.bit
ULX2S / ULX3S JTAG programmer v 3.0.92 (built Feb 13 2019 12:27:20)
Using USB cable: ULX3S FPGA 12K v3.0.3
open(*.bit) failed
Programming: 0% -
Failed.

do NOT specify COM port, [explicit file name]: finds file, completes, SUCCESS on upload file:

C:\workspace-git\f32c_tools\ujprog>ujprog  ulx3s.bit
ULX2S / ULX3S JTAG programmer v 3.0.92 (built Feb 13 2019 12:27:20)
Using USB cable: ULX3S FPGA 12K v3.0.3
Programming: 100%
Completed in 18.66 seconds.
gornjas commented 5 years ago

Wildcard expansion is a job of the shell, not the application. On all standard windows cmd shells I've been using so far (Windows XP, Vista, 7, 8, 8.1, 10), wildcard expansion works just fine.

JTAG doesn't work in COM mode, so no wonder that uploading a bitstream can't work that way, especially not when using the -a modifier, which tells the ujprog to send the file as a stream of bytes.

emard commented 5 years ago

seems wildcard is not expanded for windows, it probably tries to find file ".bit" (asterisk as part of file name

-a is used for plain ascii upload in compatiblity COM RS232 port mode without -a ujprog runs in FTDI vendor specific mode and COM is not specified because it looks for usb product/vendor id and names because it needs to bitbang JTAG, not do any COM port RS232 at all

On 2/15/19, gojimmypi notifications@github.com wrote:

specify COM port, and -a *.bit; FAILS to find any files:

C:\workspace-git\f32c_tools\ujprog>ujprog  -P COM9 -a *.bit
ULX2S / ULX3S JTAG programmer v 3.0.92 (built Feb 13 2019 12:27:20)
*.bit: cannot open

specify COM port, and -a [explicit file name]; finds file, completes,

FAILS to actually upload file:

C:\workspace-git\f32c_tools\ujprog>ujprog  -P COM9 -a ulx3s.bit
ULX2S / ULX3S JTAG programmer v 3.0.92 (built Feb 13 2019 12:27:20)
Sending ulx3s.bit: done.

do NOT specify COM port, [wildcard file name]: does not find file,

FAILS:

C:\workspace-git\f32c_tools\ujprog>ujprog *.bit
ULX2S / ULX3S JTAG programmer v 3.0.92 (built Feb 13 2019 12:27:20)
Using USB cable: ULX3S FPGA 12K v3.0.3
open(*.bit) failed
Programming: 0% -
Failed.

do NOT specify COM port, [explicit file name]: finds file, completes,

SUCCESS on upload file:

C:\workspace-git\f32c_tools\ujprog>ujprog  ulx3s.bit
ULX2S / ULX3S JTAG programmer v 3.0.92 (built Feb 13 2019 12:27:20)
Using USB cable: ULX3S FPGA 12K v3.0.3
Programming: 100%
Completed in 18.66 seconds.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/f32c/tools/issues/10