• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working loader for MacOS!
We're going to be doing labs with these boards remotely next quarter, we've arranged for remote Windows systems to do the compilation, but half the students have Macs, so I needed a Mac version of the binary loader.  

I was able to pretty easily port the standalone (officially deprecated) command line alchitry-loader for MacOS by doing the following...

From here: https://www.ftdichip.com/Drivers/D2XX.htm
- Download the driver library for 10.4 and later
- Also download and install the "D2XX Helper Tool" (this prevents MacOS from overriding the drivers)
- Follow the instructional video (if you have the helper tool, you don't have to do the "kextunload" step)

Then do 
>git clone https://github.com/alchitry/alchitry-loader
>cd alchitry-loader/src
>c++ -o Alchitry_Loader *.cpp -lftd2xx -lpthread

This will generate a LOT of warnings (>70), but the resulting executable seems to run correctly. 

To test it, do
> ./Alchitry_Loader -l
and it should find the board and return
  0: Alchitry Au
  1: Unknown
Found Au as device 0.

To do a volatile load of a configuration, do
> ./Alchitry_Loader -r (project).bin  

If you want to erase or program the flash, you also need a "bridge" .bin file. You can find "au_loader.bin" and "cu_loader.bin" in this archive:

You then erase the flash with
> ./Alchitry_Loader -p au_loader.bin -e

and program it with
> ./Alchitry_Loader -p au_loader.bin -f project.bin

To date this has only been tested with an Alchitry Au under MacOS Catalina
I have a Windows machine in another room and have been using my Mac and VNC to access the Alchitry Labs IDE tool on Windows. The board is connected to my Mac and I access the generated bin file over the network once built. Your loader instructions enabled me to load bin files to the board connected to my Mac.

I have been working my way through the Learning FPGAs book. Things were working great, until...wanting to load the FSM stopwatch example from chapter 5. I get:

$ ./Alchitry_Loader -r "/Volumes/c/Users/chuck/Documents/alchitry/FSM/work/alchitry.bin"
Found Au as device 0.
Programming FPGA...
libc++abi.dylib: terminating with uncaught exception of type std::invalid_argument: stoi: no conversion
Abort trap: 6

It seems like a bug in the loader, but alas, if your network share goes away, you will get this error.
Thank you so much. In my VM, the loader "Did not find Au!". By running the loade on Mac and Lab in an VM now works.

Why the Lab in Ubuntu VM gives a Cannot find Au is a question I would like to know...

Forum Jump:

Users browsing this thread: 1 Guest(s)