f32c / tools

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

issue compiling on Linux #16

Open chriscamacho opened 4 years ago

chriscamacho commented 4 years ago

While adjusting some paths in the makefile is almost expected! I did have to modify the source to get it to compile at around line 824 of ujprog.c

    //#ifdef __linux__
    //    usb_reset((void *) fc.usb_dev);
    //#else
         res = ftdi_usb_close(&fc);

in the makefile I had to comment out the arch define (the libs being in /usr/lib) I had to add include directories

     -I/usr/include/libftdi1 -I/usr/include/libusb-1.0

additionally I had to change the order of libs and add a few

    FTLIB = /usr/lib/${ARCHNAME}/libftdi1.a
    USBLIB = /usr/lib/${ARCHNAME}/libusb-1.0.a

    ujprog: ${SRCS}
        ${CC} ${CFLAGS} ${SRCS} -o ujprog ${FTLIB} ${USBLIB} -lpthread -ludev 

while specific lib name and path oddities are distro specific, maybe the source modification needs review ?

Hope this helps

chriscamacho commented 4 years ago

oh sorry forgot to mention, I'm running Void Linux on x86_64

emard commented 4 years ago

HI

This is "normal" even the same linux distribution may change over the time. Currently I have debian linux and I get clean compile, not a single warning

make -f Makefile.linux cc -Wall -Dlinux -std=gnu99 -static ujprog.c /usr/lib/x86_64-linux-gnu/libftdi.a /usr/lib/x86_64-linux-gnu/libusb.a -o ujprog ls -al ujprog -rwxr-xr-x 1 guest guest 1013184 Nov 1 13:15 ujprog

I'm currently trying to get original developer "gornjas" to somehow return and he left after I accepted a pull request with readme help and images for cross-platform compiling from linux to windows (yesterday I removed that)

It would be of good value to get some more difficult problems about f32c solved, there are serious issues for burst support, risc-v and similar who noone else can fix.

Therefore I must decline from any simple intervention to ujprog as long as you got binary which works.

On 11/1/19, chriscamacho notifications@github.com wrote:

oh sorry forgot to mention, I'm running Void Linux on x86_64

-- 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/16#issuecomment-548749776

chriscamacho commented 4 years ago

I'm still waiting on the new batch of ulx3s and was just building tools ready for it Once I have confirmed that the tool works I will close this issue after confirming such Out of interest - what version of Debian?

emard commented 4 years ago

You can always ask me for any issue for ULX3S

I have also uploaded binaries to https://github.com/emard/ulx3s-bin for quickstart - ujprog, openocd, selftest bitstreams, blinkleds ...

by default I use debian "testing" and pull updates almost every day for ulx3s related, once everything works you don't need to upgrade, nothing can get better :)

On 11/1/19, chriscamacho notifications@github.com wrote:

I'm still waiting on the new batch of ulx3s and was just building tools ready for it Once I have confirmed that the tool works I will close this issue after confirming such Out of interest - what version of Debian?

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/f32c/tools/issues/16#issuecomment-548807212

chriscamacho commented 4 years ago

thanks

emard commented 4 years ago

BTW have you ordered your assembly batch of ULX3S recently out of our kitspace git? Today I have reverted v3.0.9 back to v3.0.8

v3.0.9 should work also but had some halfway-done routing to program over OE pin of the clock generator which I decide to give up

if some clock generator is mounted on v3.0.9 which doesn't pull up itself OE pin then either a10k resistor should be manually added or set OE to 1 from FPGA (small bitstream incompatibility)

On 11/1/19, D EMARD vordah@gmail.com wrote:

You can always ask me for any issue for ULX3S

I have also uploaded binaries to https://github.com/emard/ulx3s-bin for quickstart - ujprog, openocd, selftest bitstreams, blinkleds ...

by default I use debian "testing" and pull updates almost every day for ulx3s related, once everything works you don't need to upgrade, nothing can get better :)

On 11/1/19, chriscamacho notifications@github.com wrote:

I'm still waiting on the new batch of ulx3s and was just building tools ready for it Once I have confirmed that the tool works I will close this issue after confirming such Out of interest - what version of Debian?

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/f32c/tools/issues/16#issuecomment-548807212

chriscamacho commented 4 years ago

I'm waiting on crowd supply and in touch with Goran

emard commented 4 years ago

Great!

On 11/1/19, chriscamacho notifications@github.com wrote:

I'm waiting on crowd supply and in touch with Goran

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/f32c/tools/issues/16#issuecomment-548821983

chriscamacho commented 4 years ago

can you do me a favour and pop your email address in this form http://bedroomcoders.co.uk/captcha/ I think we might both benefit by sharing ideas / solutions with the ulx3s...

emard commented 4 years ago

My email is vordah@gmail.com solutions welcome :)

On 11/1/19, chriscamacho notifications@github.com wrote:

can you do me a favour and pop your email address in this form http://bedroomcoders.co.uk/captcha/ I think we might both benefit by sharing ideas / solutions with the ulx3s...

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/f32c/tools/issues/16#issuecomment-548881489