Alchitry Loader on 32-bit Machines (Linux)

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

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

iceprog test.bin

This tool should be available for many devices. For Debian it is in the package fpga-icestorm

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:

Also if the flash tool is called via system command it wouldn’t work.

Ah ok.

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/tree/master/iceprog).

So I tried:

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

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:

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

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

In my build I had to specify the board type with the -t option:

./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

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/download.php?file=/eclipse/downloads/drops4/R-4.9-201809060745/swt-4.9-gtk-linux-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.

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.

late reply but i rewrote the loader to not require d2xx drivers to use on various arm sbc’s

https://github.com/sleepybishop/alchitry_loader

It is possible dear, why you are thinking like this? I am currently using ARM32, and really it’s working very well, now I am thinking to buy ARM64, I saw it on Christmas Coupons, after buying and using it will share my opinion.

@bellawatson492 this thread is about 32-bit desktop machines (i386). There it isn’t working.

  • RRC