• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..17-Nov-2019-

Makefile.bsdH A D17-Nov-2019436 2215

Makefile.linuxH A D17-Nov-2019576 2815

Makefile.ming32H A D17-Nov-20191.1 KiB4729

Makefile.ming32_64H A D17-Nov-20191,019 4529

Makefile.osxH A D17-Nov-2019441 2012

Makefile.winH A D17-Nov-2019521 3021

README.mdH A D17-Nov-20193.3 KiB10773

ft232r_flash.cH A D17-Nov-20192.2 KiB10183

ftd2xx.hH A D17-Nov-201936.7 KiB1,342983

ujprog.cH A D17-Nov-201991.2 KiB4,3373,728

ulx2s_prep.shH A D17-Nov-2019105 63

README.md

1# ULX2S / ULX3S JTAG programmer usage:
2
3```
4ULX2S / ULX3S JTAG programmer v 3.0.92
5Usage: ujprog [option(s)] [bitstream_file]
6
7 Valid options:
8  -p PORT       Select USB JTAG / UART PORT (default is 0)
9  -P TTY        Select TTY port (valid only with -t or -a)
10  -j TARGET     Select bitstream TARGET as SRAM (default) or FLASH (XP2 only)
11  -f ADDR       Start writing to SPI flash at ADDR, optional with -j flash
12  -s FILE       Convert bitstream to SVF FILE and exit
13  -r            Reload FPGA configuration from internal Flash (XP2 only)
14  -t            Enter terminal emulation mode after completing JTAG operations
15  -b SPEED      Set baudrate to SPEED (300 to 3000000 bauds)
16  -e FILE       Send and execute a f32c (MIPS/RISCV) binary FILE
17  -x SPEED      Set binary transfer speed, optional with -e
18  -a FILE       Send a raw FILE
19  -d            debug (verbose)
20  -D DELAY      Delay transmission of each byte by DELAY ms
21  -q            Suppress messages
22```
23
24# Compiling
25
26Unless regularly compiling for different targets, consider copying or
27symlinking the respective `Makefile.[target]` to your `Makefile` and
28use just "make" to compile, for example
29
30`ln -s Makefile.linux Makefile`
31
32`make`
33
34
35## BSD
36
37`make -f Makefile.bsd`
38
39
40## Linux PC (i386/amd64)
41Native linux Debian/Ubuntu, maybe many others too,
42including WSL Ubuntu, but reminder there's no WSL support for USB devices, only tty!
43
44`make -f Makefile.linux`
45
46
47## Linux RaspberryPI-3 (armhf)
48
49Edit Makefile.linux and enable this:
50`ARCHNAME = arm-linux-gnueabihf`
51
52`make -f Makefile.linux`
53
54
55## OSX
56
57`make -f Makefile.osx`
58
59
60## Windows
61
62`make -f Makefile.win`
63
64# Troubleshooting
65
66*** WINDOWS ***
67
68Most issues come from windows platform. In some cases
69ujprog doesn't work. Sometimes it is just a matter of dynamic
70linking (DLL file "ftd2xx.dll" or "ftd2xx64.dll", easiest is
71just to copy this file from FTDI D2XX CDM driver to the same
72directory where ujprog.exe is)
73
74On VoIFS there is strange problem related with ujprog.exe
75compiled with mingw. ujprog.exe, if started from "wrong" directory
76doesn't work. When started from "wrong" directory, ujprog.exe
77will exit without printing any error or any other message while
78it should print help/usage message shown on top of this page.
79Possible cause of this problem is that "ftd2xx64.dll" (for win64)
80is found copied to System32 directory under name "ftd2xx.dll" (for win32).
81
82Possible solution would be to remove all ftd2xx copies and copy
83ujprog.exe and dll to another directory and try again.
84
85*** LINUX ***
86
87Here we have much better success, ujprog is statically linked and
88doesn't depend on any other file. Most issues come from user permissions
89so ujprog should be either run as root or the user should be given
90permissions to access USB and serial device, that's usually done
91easily with some udev rule:
92
93    # /etc/udev/rules.d/80-fpga-ulx3s.rules
94    # this is for usb-serial tty device
95    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", \
96      MODE="664", GROUP="dialout"
97    # this is for ujprog libusb access
98    ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", \
99      GROUP="dialout", MODE="666"
100
101*** APPLE ***
102
103There can be many problems, I don't know what to do
104one of the issues is that ujprog executable may needs
105some dynamic linked library of specific version like libusb
106
107