Install and use freedom-e-sdk in Cygwin

This indeed is a matter of preference, but an option to program the HiFive1 while using Windows and without using a virtual machine to run Linux seems to be possible by using Cygwin.

Cygwin: … a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows.

Roughly the same packages and dependencies are needed to build freedom-e-sdk in Cygwin. The version 2.6.3 of “flex” (fast lexical analyser generator) that comes with current Cygwin package is known to interfere with the tool build. Uninstall this and use an earlier version.

After a successful build, check if the sample software compiles as usual:

$ make software PROGRAM=hello BOARD=freedom-e300-hifive1

In order to enable the upload of compiled programs to HiFive1 via command line tools from the sdk, install “WinUSB” from Windows side. Use Zadig helper utility and choose ‘Dual RS232-HS Interfaces 0 and 1’.

Then, check the upload to HiFive1 as usual:
indent preformatted text by 4 spaces
$ make upload PROGRAM=hello BOARD=freedom-e300-hifive1

A terminal to interact directly with HiFive1 without disabling the “WinUSB” driver is perhaps useful, a quick google search found ftditerm (GitHub - informationsea/ftditerm: FTDI Terminal with libftdi), this needs to be modified a bit to use the open libftdi driver (libFTDI » FTDI driver download - Open Source) instead (just change “ftdi” library references to “ftdi1” and include appropriate paths), this utility also depends on “libconfuse” and “libusb”.

To run and connect, issue:

$ ftditerm.exe -B
Connection Succeed
Baudrate 115200    8 Bits   1 Stop bit   None Parity
Enter RAW Mode.
core freq at 266607001 Hz
hello world!

Progam has exited with code:0x00000000

Regards ,

Leonardo

2 Likes