lattice Diamond on Linux - programming doesn't work...

B

Brane2

Guest
I've managed to manually install Diamond ( latest 3.1 64-bit) on my Gentoo.

Now everything seems to be working, except programming the chip on board.

I am playing with their MachXO2 breakout board and such boards have FTDI-2232 chip for programming.

If doesn't matter if I start programming tool within Diamond or manually, it behaves the same.

It detects the FTDI chip, when I plug USB cable in the board and then start cable detect:

"Board with FTDI USB Host Chip detected.
INFO - Multiple cables detected!"

But if I try to scan chips in JTAG chain, i get:

"ERROR - Scan Failed - Creating Blank Programmer Project
The other process currently running. Cannot continue."


And programming attempt gets me:

"The other process currently running. Cannot continue."


So program can detect that the FTDI chip on breakout board is accessible, it just can't do anything with it.


I tried everything. I replaced the HW, cable, used different USB port, changed the FTDI VCP access library for newer one etc etc.

Nothing works. I don't think Diamond is that sensitive to library version since it packs all tricky libraries by itself.

Only thing I haven't checked yet is how the dynamic loader finds and loads them. It might be that some system libs are used instead of bundled ones.

Other thing that comes to mind is that maybe something within kernel changed wrt to files and maps in /sys directory ( sysfs).

After that, I'm out of options.

I am usiong a workaround atm - standalone programmer util on separate WinXP machine and I am about to try if I can do the same with 32-bit Linux version ( after failing with 64-bit one).


My system is:

AMD Phenom II x4 955BE stock
8 GiB RAM
Radeon 6850
all open source drivers AFAIR

Gentoo 64-bit with systemd+udev
xfce desktop

kernel gentoo-sources-3.13.7, without usb-serial and ftdi module driver
( if present they hog the ftdi chip and make two extra ttyS devices, while programmer expects to be able to access the chip directly)

And I had to add manually extra rule in udev so that at usb plugin udev would create device with right ownership and access rights so that programmer util could access it:


SUBSYSTEM=="usb" , ACTION=="add" , ATTR{idVendor}=="0403" , MODE="666" , OWNER="brane2" , GROUP="users"


So, if anyone has an idea, it is welcome.
 
Dne petek, 28. marec 2014 10:22:22 UTC je oseba Brane2 napisala:

SNIP
So, if anyone has an idea, it is welcome.

Update - it works now.

Main part of the reason is that Microchip's MPLABX decided to install its own version of libusb in /usr/local/lib and dynamic loader was picking this hacked version instead system's official one.

I deleted it and now it works. At least Diamond bundle.


Standalone programmer package still criaks but that is due to missing libraries. It seems it is missing at least libpng12.so.

But this is fixable in relatively simple way. Totally same programmer utility is within Diamond, where it works.


Looking around for solution, I've found totally old Lattice's programming cable for parallel port. It's dead simple- electronics contains only 74HC367 buffer and a couple of resistors.

And it seems that it is the same thing as current parallel port ISP cable from Lattice.

I'm about to try it with Diamond on that MachXO2 breakout board...
 
Dne ponedeljek, 31. marec 2014 16:58:01 UTC je oseba rickman napisala:

Glad you got this working. Let us know if the parallel cable works for

you too.



--



Rick

Nope. It seems I have killed an FPGA with it.

It really would help if there was a simple schematics of the latest parallel cable.

And it doesn't seem programmer util from diamond recognises it.

I had to muck around with ispVM, which is old and I had to chase obsolete old libraries all over the net for it and when I found them, I couldn't check that tehy work good on my system besides obvious dynamic linking check with ldd.

In the end, program has kind of started, but I couldn't detect cable. And I burned the FPGA while trying.

One of the possible reasons might be that I had parallel port + 2 x serial ports on PCI card, which got mapped in memory, not through I/O ports ( reported memory localtion of parallel port region was 0xe000 instead of "classic" I/O port ).

When autodetecting, progam has set address to 0xe000, but then it couldn't do anything with it.

Since I now had the way to program the chip, I stopped playing with the cable.

It would b interesting to finish the job had I got the schematics ( asuming it is simple, like most parallel port cables) and in case bundled programmer util would work with it.

Or even better, something open source that I could compile for my system and debug with less pain...
 
On 3/28/2014 6:40 PM, Brane2 wrote:
Dne petek, 28. marec 2014 10:22:22 UTC je oseba Brane2 napisala:

SNIP
So, if anyone has an idea, it is welcome.

Update - it works now.

Main part of the reason is that Microchip's MPLABX decided to install its own version of libusb in /usr/local/lib and dynamic loader was picking this hacked version instead system's official one.

I deleted it and now it works. At least Diamond bundle.


Standalone programmer package still criaks but that is due to missing libraries. It seems it is missing at least libpng12.so.

But this is fixable in relatively simple way. Totally same programmer utility is within Diamond, where it works.


Looking around for solution, I've found totally old Lattice's programming cable for parallel port. It's dead simple- electronics contains only 74HC367 buffer and a couple of resistors.

And it seems that it is the same thing as current parallel port ISP cable from Lattice.

I'm about to try it with Diamond on that MachXO2 breakout board...

Glad you got this working. Let us know if the parallel cable works for
you too.

--

Rick
 

Welcome to EDABoard.com

Sponsor

Back
Top