• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alchitry Loader on 32-bit Machines (Linux)
#1
Wink 
For other users using the ancient 32-bit processor architecture the software package is not executable directly as it is only compiled for 64-bit computers. Fortunately it is possible to emulate such a processor with qemu-x86_64 contained by the qemu-user package in the Debian distribution. I was successfully able to upload a bitstream to my Alchitry Cu by executing
Code:
qemu-x68_64 ./tools/loader -f  test.bin
in the extracted package directory of Alchitry Loader.
I don't think that it is possible to launch the GUI easy like this. But in my usecase it is all I wanted since I use project Icestorm directly to develop my stuff on that FPGA.

-RRC

_____
Update:
For the Alchitry Cu there is a way better solution in using the iceprog tool of project IceStorm.
I was able to upload the bitstream by just executing
Code:
iceprog test.bin
This tool should be available for many devices. For Debian it is in the package fpga-icestorm
  Reply
#2
I'm not sure but since its written in java, you should be able to run it in a 32-bit JVM.
  Reply
#3
(03-02-2019, 04:53 PM)iggyglass Wrote: I'm not sure but since its written in java, you should be able to run it in a 32-bit JVM.

There are libraries that require 64-bit. Here the error message:

Quote:/usr/local/bin/alchitry/lib Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM at org.eclipse.swt.internal.Library.loadLibrary(Library.java:261) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:241) at org.eclipse.swt.internal.C.(C.java:19) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:209) at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:155) at org.eclipse.swt.widgets.Display.(Display.java:153) at com.alchitry.loader.AlchitryLoader.open(AlchitryLoader.java:53) at com.alchitry.loader.AlchitryLoader.main(AlchitryLoader.java:43)

Also if the flash tool is called via system command it wouldn't work.
  Reply
#4
Ah ok.
  Reply
#5
It would be also super nice to be able to load the boards from a ARM32 or ARM64 single board computer.

Indeed for a «medium project» I am considering putting together a small ARM64 SBC (for «outside world interface») with a Cu board, and I'd be happy if I could directly update the bitstream of the board from the ARM64 SBC rather than having to temporarily connect the Cu to a amd64 computer.

Any chances that the loader get «open-sourced» later on ?

Cheers,

Serge.

PS : to me it seems that the «loader» itself is «only C/C++» without any java on it… ?
  Reply
#6
(03-03-2019, 11:14 AM)serge Wrote: It would be also super nice to be able to load the boards from a ARM32 or ARM64 single board computer.

Indeed for a «medium project» I am considering putting together a small ARM64 SBC (for «outside world interface») with a Cu board, and I'd be happy if I could directly update the bitstream of the board from the ARM64 SBC rather than having to temporarily connect the Cu to a amd64 computer.

Any chances that the loader get «open-sourced» later on ?

Cheers,

Serge.

PS : to me it seems that the «loader» itself is «only C/C++» without any java on it… ?

Yes you are right: The loader itself is C++ but the GUI not.

The tool is open-sourced (https://github.com/alchitry/alchitry-loader/) except the proprietary FTDI library that is precompiled (why not the open source one?).

Some of the code (spi.cpp) seems to originate from project IceStorm's iceprog tool (https://github.com/cliffordwolf/icestorm...er/iceprog).

So I tried:

Code:
iceprog test.bin
It worked excellent on my Alchitry Cu!

This tool uses also the open source libftdi library. It should be available for almost all platforms as ARM etc.
But it only flashes the Cu.

Hope that helps
  Reply
#7
There is also a third probability: I was able to build a 32-bit version of the alchitry-loader repo. This procedure should also work for other platforms.
Here is how to do it:

First clone the alchitry-loader repository:

Code:
git clone https://github.com/alchitry/alchitry-loader
cd alchitry-loader


In the lib/linux directory there is the precompiled proprietary FTDI library libftd2xx.a. It has to be replaced.
Download the driver for your platform from https://www.ftdichip.com/Drivers/D2XX.htm .

In the downloaded archive there should be a file that has the name libftd2xx.a . In my case it was in the ./release/build/ directory.
Copy it into the lib/linux directory of the repository as replacement.

Make shure there is a libpthread installed. Debian package(?): libpthread-stubs0-dev

Then compile it

Code:
g++ -o loader src/*.cpp -L ./lib/linux/ -lftd2xx -lpthread

In my build I had to specify the board type with the -t option:
Code:
./loader -t cu -f test.bin

This build should also work for the Au board. I could not test because I have no Au. If somone verifies that, I will append an update to the top post.

-RRC
  Reply
#8
Is there much demand for a Linux 32bit version of Alchitry Labs? 

I believe the only 64bit specific things right now are the SWT jar (32bit version available here https://www.eclipse.org/downloads/downlo...ux-x86.zip) and the Alchitry Loader was built for 64bit.

We are going to make a version of the loader that uses the open source FTDI driver instead pretty soon since the proprietary one doesn't work in VMs.
  Reply
#9
I think there is more demand for the Alchitry Loader on ARM devices that would enable an ARM SBC to upload a bitstream.

I willl try to build a 32-bit version of Alchitry Labs. Should be easy to make.
How is the Java stuff compiled? Some documentation or just a Makefile would be helpful.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)