Windows platform compiler and IDE


It seems the compiler in Freedom SDK can only work only under Linux. Is any compiler available on Windows environment?

In addition, when Arduino-Compatible SDK for HiFive1 is going to be released?




We’re very actively working on the Arduino SDK and getting it cleaned up to make it easy for people to install (vs having to compile the tools themselves). We’re hoping to release that by the end of next week.

I’ve heard rumors of people getting the RISC-V tools to work on Windows in environments like Cygwin. If you try it out, please report back what problems you encounter and we can all work together to get a foolproof way for running on Windows.



I have Cygwin. Will try it later.

I am now going through to process of trying to install the freedom-e300-sdk on Windows using Cygwin. The make tools has been runnung for quite some time now without throwing errors, so I am fairly confident of eventual success. I am writing this now perhaps premature, but I want to use the time waiting for make tools to complete usefully rather than just watching the terminal grind away.

Here are the steps I have taken:

  1. Fresh install of Cygwin64 on a Lenovo Laptop: 4 processors, 8GB ram, 1TB SSD,
    Windows 7 64-bit.

  2. Coloned freedom-e-sdk.git. Note: I first tried to use the download option in Github, but it did not work for me. I only got the top level freedom-e-sdk-master with a total of 272 KB of data. I therefore installed the Github GUI and used that to clone freedom-e-sdk to my Cygwin home directory.

  3. Checked the Cygwin installation for inclusion of the packages listed in the readme file of the freedom-e-sdk directory as being required, and installed those which were not yet included.

  4. attempted make tools. This quickly revealed that Cygwin was not able to handle the line formating in the .git configure files. After a bit of duck-duck-going (I don’t google anymore) I found that I could easily modify the affected files using the free tool Notepad++, so I installed that in Windows. At first I waited for errors, usually looking something like this:

/home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/ line 20: $’\r’: command not found
/home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/ line 25: $’\r’: command not found
/home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/ line 31: $’\r’: command not found
/home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/ line 36: $’\r’: command not found
/home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/ line 37: syntax error near unexpected token $'in\r'' /home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/ line 37:case "${

The $’\r’ line ending is the only problem I have yet encountered. This can be corrected by opening the file in Notepad++, selecting Edit->Format Line Ending->Convert to UNIX, and then saving the file. After a while it appeared that this problem only popped up in Configure files, with one exception: C:\cygwin64\home\Donnie\freedom-e-sdk\riscv-gnu-toolchain\scripts\cp_s which also was affected, but instead of a line ending problem, make reported “unexpected end of file” error, which I fixed by adding a comment line at the end of the file. So rather than continuing to wait for errors I decided to proactively search for and correct all Configure files.

Note: I am certain there is a better way of doing this instead of using Notepad++, probably using regular expressions, but I leave that up to someone else to come up with.

After modifying all the Configure files and cp_s, I ran make clean and then again started make tools in the freedom-e-sdk directory under my Cygwin home. I will report the results when the make job is finished.

Best regards,

Ok, the job is not yet finished, but an additional file has thrown the $’\r’-error:> /home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/…/bfd/ line 17: $’\r’: command not found

Also, please note that you cannot rely on the make crashing on such errors. In the above case it did not. You have to carefully review the output to ensure that no necessary file modifications were omitted.

Thanks for reporting Donnie.

I’m wondering if this problem can be resolved at the repository level, something like


make tools has completed, but I see an error at the end of the process which I am unable to decipher:

touch mmo.stamp
creating bfdver.texi
restore=: && backupdir=".am$$" &&
rm -rf $backupdir && mkdir $backupdir &&
if (makeinfo --split-size=5000000 --split-size=5000000 --version) >/dev/null 2>&1; then
for f in[0-9][0-9][0-9] bfd.i[0-9] bfd.i[0-9][0-9]; do
if test -f $f; then mv $f $backupdir; restore=mv; else :; fi;
else :; fi &&
if makeinfo --split-size=5000000 --split-size=5000000 -I /home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/doc
-o test -f 'bfd.texinfo' || echo '/home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/doc/'bfd.texinfo;
$restore $backupdir/* echo "./" | sed 's|[^/]*$||';
rm -rf $backupdir; exit $rc
/home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/doc/bfd.texinfo:199: @menu-Referenz auf nicht existierenden Knoten „typedef bfd“
/home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/doc/bfd.texinfo:200: @menu-Referenz auf nicht existierenden Knoten „Error reporting“
/home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/doc/bfd.texinfo:201: @menu-Referenz auf nicht existierenden Knoten „Miscellaneous“
/home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/doc/bfd.texinfo:222: Prev-Referenz zu nicht existierendem „Miscellaneous“
make[5]: *** [Makefile:472:] Fehler 1
make[5]: Verzeichnis „/home/Donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-binutils-newlib/bfd/doc“ wird verlassen
Making info in po
make[5]: Verzeichnis „/home/Donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-binutils-newlib/bfd/po“ wird betreten
( if test ‘x/home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/po’ != ‘x.’; then
&& (sed -e ‘/^#/d’
-e '/^[ ]$/d’
-e "s@.
@ $posrcprefix& \\@" < /home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/po/
| sed -e ‘$s/\$//’) > SRC-POTFILES-t
&& chmod a-w SRC-POTFILES-t
&& (sed -e ‘/^#/d’
-e '/^[ ]$/d’
-e "s@.
@ …/& \\@" < /home/Donnie/freedom-e-sdk/riscv-gnu-toolchain/riscv-binutils-gdb/bfd/po/
| sed -e ‘$s/\$//’) > BLD-POTFILES-t
&& chmod a-w BLD-POTFILES-t
cd …
CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating po/
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default-1 commands
config.status: executing bfd_stdint.h commands
config.status: executing default commands
make[5]: Für das Ziel „info“ ist nichts zu tun.
make[5]: Verzeichnis „/home/Donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-binutils-newlib/bfd/po“ wird verlassen
make[5]: Verzeichnis „/home/Donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-binutils-newlib/bfd“ wird betreten
make[5]: Für das Ziel „info-am“ ist nichts zu tun.
make[5]: Verzeichnis „/home/Donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-binutils-newlib/bfd“ wird verlassen
make[4]: *** [Makefile:1715: info-recursive] Fehler 1
make[4]: Verzeichnis „/home/Donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-binutils-newlib/bfd“ wird verlassen
make[3]: *** [Makefile:2730: all-bfd] Fehler 2
make[3]: Verzeichnis „/home/Donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-binutils-newlib“ wird verlassen
make[2]: *** [Makefile:854: all] Fehler 2
make[2]: Verzeichnis „/home/Donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-binutils-newlib“ wird verlassen
make[1]: *** [Makefile:236: stamps/build-binutils-newlib] Fehler 2
make[1]: Verzeichnis „/home/Donnie/freedom-e-sdk/work/riscv32-gnu-toolchain“ wird verlassen
make: *** [Makefile:67: /home/Donnie/freedom-e-sdk/toolchain/bin/riscv32-unknown-linux-gnu-gcc] Fehler 2

Donnie@LAB ~/freedom-e-sdk

Lines 468-478 of the Makefile in folder C:\cygwin64\home\Donnie\freedom-e-sdk\work\riscv32-gnu-toolchain\build-binutils-newlib\bfd\doc look like this (line 472 in italics):

-rm -rf .libs _libs bfd.texinfo $(bfd_TEXINFOS)
_restore=: && backupdir="$(am__leading_dot)am$$$$" && _
rm -rf $$backupdir && mkdir $$backupdir &&
if ($(MAKEINFO) --version) >/dev/null 2>&1; then
for f in $@ $@-[0-9] $@-[0-9][0-9] $([0-9] $([0-9][0-9]; do
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi;
else :; fi && \

Does anyone understand the problem there?


It might be easier to run an actual Linux in VirtualBox or docker…

Am already doing that. This is just an exercise for testing on the Windows framework.

Looks very promising. I will try it out and report.

Many thanks,

Hi Megan,

After reading through the link you provided, I did the following.

  1. Deleted my cloned local freedom-e-sdk directory.
  2. Opened a Git Shell and set up the line ending global settings:

  1. Performed a fresh clone of SiFive/freedom-e-sdk
  2. Performed spot checks on some text files using Notepad++ and confirmed lines ending with LF and not CRLF.
  3. Opened a Cygwin64 terminal as administrator and started make tools in freedom-e-sdk home directory.

After several hours of grinding bits through 10 layers of Make, make tools completed nicely, this time not throwing any errors.

  1. In the Cygwin64 terminal, attempted to compile demo_gpio.

I still have to work out what is happening here (presumably a problem with Cygwin properly handling link files).

Assuming the presumed link file problem above can be solved, it looks like Cygwin is a viable framework for running freedom-e-sdk on a Windows platform when the following prerequisites are met: all required packages are installed on Cygwin (as listed in freedom-e-sdk readme file), correct GitHub global settings for line endings set to LF prior to cloning, and a minimum of 7GB free available disc space for local GitHub clone.

Best regards,

Hi Megan,

If I copy the, start.S and entry.S from the linked freedom-e300-hifive1 directory into the freedom-e300-arty directory, overwriting the files there, then the software make works. A presumably easy solution then might be to keep separate copies of the entry.S and start.S files in each device directory, rather than relying on syslinks. I wonder if that might also preclude any possible future problems if the HiFive1 and Arty devices end up needing different file content.

What do you think?



Thank you so much for reporting your results!

We made a conscious decision to use the simlinks because the files were identical and we didn’t want to have to maintain the two copies. A better solution would be for us to move them to a “common” location and pointing the common build flow to those files.


We updated the freedom-e-sdk to move the simlinked files to a seperate shared directory. Give it a shot if you’d like.

Note that we also bumped the riscv-gnu-toolchain and there is one more package dependency.


Hi Megan,

After installing zlib1g-dev on Ubuntu, then git pull, make tools and make software_clean PROGRAM=demo_gpio BOARD=freedom-e300-arty, make software PROGRAM=demo_gpio BOARD=freedom-e300-arty no longer works in my Ubuntu 16.04 platform:

donnie@SiFive:/media$ sudo apt-get install zlib1g-dev
[sudo] password for donnie:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following package was automatically installed and is no longer required:
Use ‘sudo apt autoremove’ to remove it.
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 11 not upgraded.
Need to get 168 kB of archives.
After this operation, 426 kB of additional disk space will be used.
Get:1 xenial/main amd64 zlib1g-dev amd64 1:1.2.8.dfsg-2ubuntu4 [168 kB]
Fetched 168 kB in 4s (40,6 kB/s)
Selecting previously unselected package zlib1g-dev:amd64.
(Reading database … 209597 files and directories currently installed.)
Preparing to unpack …/zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4_amd64.deb …
Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4) …
Processing triggers for man-db (2.7.5-1) …
Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4) …
donnie@SiFive:/media$ cd
donnie@SiFive:~$ cd freedom-e-sdk

donnie@SiFive:~/freedom-e-sdk$ sudo git pull
[sudo] password for donnie:
remote: Counting objects: 114, done.
remote: Compressing objects: 100% (65/65), done.
remote: Total 114 (delta 55), reused 102 (delta 43), pack-reused 0
Receiving objects: 100% (114/114), 15.05 KiB | 0 bytes/s, done.
Resolving deltas: 100% (55/55), completed with 18 local objects.
5d24496…15ad5fc master -> origin/master

  • [new branch] move-common-files -> origin/move-common-files
    Fetching submodule riscv-gnu-toolchain
    remote: Counting objects: 281, done.
    remote: Compressing objects: 100% (277/277), done.
    remote: Total 281 (delta 22), reused 0 (delta 0), pack-reused 0
    Receiving objects: 100% (281/281), 654.04 KiB | 605.00 KiB/s, done.
    Resolving deltas: 100% (22/22), done.
  • [new branch] integrate-for-binutils -> origin/integrate-for-binutils
    805ee1d…e3e50c5 master -> origin/master
  • [new branch] sdk -> origin/sdk
    Fetching submodule riscv-gnu-toolchain/riscv-binutils-gdb
    remote: Counting objects: 3542, done.
    remote: Compressing objects: 100% (136/136), done.
    remote: Total 3542 (delta 3028), reused 2958 (delta 2958), pack-reused 448
    Receiving objects: 100% (3542/3542), 1.80 MiB | 914.00 KiB/s, done.
    Resolving deltas: 100% (3100/3100), completed with 1258 local objects.
    d1842c4…f14e97b archive -> origin/archive
  • 015bf92…478a5a2 riscv-next -> origin/riscv-next (forced update)
    Fetching submodule riscv-gnu-toolchain/riscv-gcc
    remote: Counting objects: 12392, done.
    remote: Total 12392 (delta 9898), reused 9898 (delta 9898), pack-reused 2494
    Receiving objects: 100% (12392/12392), 3.66 MiB | 946.00 KiB/s, done.
    Resolving deltas: 100% (10338/10338), completed with 1947 local objects.
  • [new branch] coremark-regression -> origin/coremark-regression
    5a0461e…961743c riscv-gcc-6.1.0 -> origin/riscv-gcc-6.1.0
  • [new branch] riscv-next -> origin/riscv-next
    Fetching submodule riscv-gnu-toolchain/riscv-glibc
    remote: Counting objects: 31, done.
    remote: Compressing objects: 100% (7/7), done.
    remote: Total 31 (delta 24), reused 29 (delta 22), pack-reused 0
    Unpacking objects: 100% (31/31), done.
    36cc082…31692a3 riscv-next -> origin/riscv-next
    Updating 5d24496…15ad5fc
    .gitignore | 4 +
    Makefile | 2 ± | 5 ±
    bsp/env/ | 37 ++±–
    bsp/env/entry.S | 95 ++++++++++++++++
    bsp/env/freedom-e300-arty/entry.S | 1 -
    bsp/env/freedom-e300-arty/init.c | 2 +
    bsp/env/freedom-e300-arty/platform.h | 5 ±
    bsp/env/freedom-e300-arty/start.S | 1 -
    bsp/env/freedom-e300-hifive1/entry.S | 102 -----------------
    bsp/env/freedom-e300-hifive1/init.c | 7 ±
    bsp/env/freedom-e300-hifive1/openocd.cfg | 19 ++±
    bsp/env/freedom-e300-hifive1/platform.h | 2 +
    bsp/env/freedom-e300-hifive1/start.S | 81 -------------
    bsp/env/start.S | 51 +++++++++
    bsp/env/syscall.c | 190 -------------------------------
    bsp/libwrap/ | 54 +++++++++
    bsp/libwrap/misc/write_hex.c | 19 ++++
    bsp/libwrap/stdlib/malloc.c | 17 +++
    bsp/libwrap/sys/_exit.c | 17 +++
    bsp/libwrap/sys/close.c | 9 ++
    bsp/libwrap/sys/execve.c | 9 ++
    bsp/libwrap/sys/fork.c | 9 ++
    bsp/libwrap/sys/fstat.c | 16 +++
    bsp/libwrap/sys/getpid.c | 6 +
    bsp/libwrap/sys/isatty.c | 11 ++
    bsp/libwrap/sys/kill.c | 9 ++
    bsp/libwrap/sys/link.c | 9 ++
    bsp/libwrap/sys/lseek.c | 14 +++
    bsp/libwrap/sys/open.c | 9 ++
    bsp/libwrap/sys/openat.c | 9 ++
    bsp/libwrap/sys/read.c | 30 +++++
    bsp/libwrap/sys/sbrk.c | 16 +++
    bsp/libwrap/sys/stat.c | 10 ++
    bsp/libwrap/sys/stub.h | 10 ++
    bsp/libwrap/sys/times.c | 10 ++
    bsp/libwrap/sys/unlink.c | 9 ++
    bsp/libwrap/sys/wait.c | 9 ++
    bsp/libwrap/sys/write.c | 29 +++++
    riscv-gnu-toolchain | 2 ±
    software/demo_gpio/.gitignore | 1 +
    software/demo_gpio/Makefile | 2 ±
    software/demo_gpio/demo_gpio.c | 49 +++±—
    software/dhrystone/.gitignore | 1 +
    software/dhrystone/Makefile | 5 ±
    software/dhrystone/dhry_printf.c | 4 ±
    software/dhrystone/dhry_stubs.c | 15 ±-
    software/hello/.gitignore | 1 +
    software/hello/Makefile | 2 ±
    49 files changed, 585 insertions(+), 441 deletions(-)
    create mode 100644 .gitignore
    create mode 100644 bsp/env/entry.S
    delete mode 120000 bsp/env/freedom-e300-arty/entry.S
    delete mode 120000 bsp/env/freedom-e300-arty/start.S
    delete mode 100644 bsp/env/freedom-e300-hifive1/entry.S
    delete mode 100644 bsp/env/freedom-e300-hifive1/start.S
    create mode 100644 bsp/env/start.S
    delete mode 100644 bsp/env/syscall.c
    create mode 100644 bsp/libwrap/
    create mode 100644 bsp/libwrap/misc/write_hex.c
    create mode 100644 bsp/libwrap/stdlib/malloc.c
    create mode 100644 bsp/libwrap/sys/_exit.c
    create mode 100644 bsp/libwrap/sys/close.c
    create mode 100644 bsp/libwrap/sys/execve.c
    create mode 100644 bsp/libwrap/sys/fork.c
    create mode 100644 bsp/libwrap/sys/fstat.c
    create mode 100644 bsp/libwrap/sys/getpid.c
    create mode 100644 bsp/libwrap/sys/isatty.c
    create mode 100644 bsp/libwrap/sys/kill.c
    create mode 100644 bsp/libwrap/sys/link.c
    create mode 100644 bsp/libwrap/sys/lseek.c
    create mode 100644 bsp/libwrap/sys/open.c
    create mode 100644 bsp/libwrap/sys/openat.c
    create mode 100644 bsp/libwrap/sys/read.c
    create mode 100644 bsp/libwrap/sys/sbrk.c
    create mode 100644 bsp/libwrap/sys/stat.c
    create mode 100644 bsp/libwrap/sys/stub.h
    create mode 100644 bsp/libwrap/sys/times.c
    create mode 100644 bsp/libwrap/sys/unlink.c
    create mode 100644 bsp/libwrap/sys/wait.c
    create mode 100644 bsp/libwrap/sys/write.c
    create mode 100644 software/demo_gpio/.gitignore
    create mode 100644 software/dhrystone/.gitignore
    create mode 100644 software/hello/.gitignore

donnie@SiFive:~/freedom-e-sdk$ sudo make tools
mkdir -p /home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain
cd /home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain; /home/donnie/freedom-e-sdk/riscv-gnu-toolchain/configure --prefix=/home/donnie/freedom-e-sdk/toolchain --with-arch=rv32ima --with-abi=ilp32
configure: WARNING: unrecognized options: --with-abi
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking for grep that handles long lines and -e… /bin/grep
checking for fgrep… /bin/grep -F
checking for grep that handles long lines and -e… (cached) /bin/grep
checking for bash… /bin/bash
checking for __gmpz_init in -lgmp… yes
checking for mpfr_init in -lmpfr… yes
checking for mpc_init2 in -lmpc… yes
checking for curl… /usr/bin/curl
checking for wget… /usr/bin/wget
checking for ftp… /usr/bin/ftp
configure: creating ./config.status
config.status: creating Makefile
config.status: creating scripts/wrapper/awk/awk
config.status: creating scripts/wrapper/sed/sed
configure: WARNING: unrecognized options: --with-abi
make -C /home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain
make[1]: Entering directory '/home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain’
make[1]: Nothing to be done for ‘all’.
make[1]: Leaving directory '/home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain’
All Tools Installed

donnie@SiFive:~/freedom-e-sdk$ sudo make software_clean PROGRAM=demo_gpio BOARD=freedom-e300-arty
cd /home/donnie/freedom-e-sdk/software/demo_gpio;
make clean
make[1]: Entering directory '/home/donnie/freedom-e-sdk/software/demo_gpio’
rm -f …/…/bsp/libwrap/stdlib/malloc.o …/…/bsp/libwrap/sys/open.o …/…/bsp/libwrap/sys/lseek.o …/…/bsp/libwrap/sys/read.o …/…/bsp/libwrap/sys/write.o …/…/bsp/libwrap/sys/fstat.o …/…/bsp/libwrap/sys/stat.o …/…/bsp/libwrap/sys/close.o …/…/bsp/libwrap/sys/link.o …/…/bsp/libwrap/sys/unlink.o …/…/bsp/libwrap/sys/execve.o …/…/bsp/libwrap/sys/fork.o …/…/bsp/libwrap/sys/getpid.o …/…/bsp/libwrap/sys/kill.o …/…/bsp/libwrap/sys/wait.o …/…/bsp/libwrap/sys/isatty.o …/…/bsp/libwrap/sys/times.o …/…/bsp/libwrap/sys/sbrk.o …/…/bsp/libwrap/sys/_exit.o …/…/bsp/libwrap/misc/write_hex.o demo_gpio …/…/bsp/env/start.o …/…/bsp/env/entry.o demo_gpio.o plic_driver.o …/…/bsp/env/freedom-e300-arty/init.o
make[1]: Leaving directory ‘/home/donnie/freedom-e-sdk/software/demo_gpio’
donnie@SiFive:~/freedom-e-sdk$ sudo make software PROGRAM=demo_gpio BOARD=freedom-e300-arty
cd /home/donnie/freedom-e-sdk/software/demo_gpio;
make[1]: Entering directory ‘/home/donnie/freedom-e-sdk/software/demo_gpio’
…/…/bsp/…/toolchain/bin/riscv32-unknown-elf-gcc -O2 -fno-builtin-printf -DUSE_PLIC -DUSE_M_TIME -g -I…/…/bsp/include -I…/…/bsp/env -I…/…/bsp/env/freedom-e300-arty -c -o …/…/bsp/env/start.o …/…/bsp/env/start.S
…/…/bsp/env/start.S: Assembler messages:
…/…/bsp/env/start.S:41: Error: illegal operands li t0,MSTATUS_FS' ../../bsp/env/start.S:46: Error: unrecognized opcodefssr x0’
…/…/bsp/env/ recipe for target ‘…/…/bsp/env/start.o’ failed
make[1]: *** […/…/bsp/env/start.o] Error 1
make[1]: Leaving directory '/home/donnie/freedom-e-sdk/software/demo_gpio’
Makefile:92: recipe for target ‘software’ failed
make: *** [software] Error 2

Seems to be a problem with the new reorganization of the env directory.
Or, must I do make clean and rebuild the entire tools compile (takes hours to run)?


Sorry for becomming a nag, but the make tools after clean also no longer works:

checking for riscv64-unknown-elf-strip… /home/donnie/freedom-e-sdk/toolchain/riscv64-unknown-elf/bin/strip
checking whether ln -s works… yes
checking for riscv64-unknown-elf-gcc… /home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-gcc-newlib/./gcc/xgcc -B/home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-gcc-newlib/./gcc/ -nostdinc -B/home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-gcc-newlib/riscv64-unknown-elf/newlib/ -isystem /home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-gcc-newlib/riscv64-unknown-elf/newlib/targ-include -isystem /home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/src/newlib-gcc/newlib/libc/include -B/home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-gcc-newlib/riscv64-unknown-elf/libgloss/riscv64 -L/home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-gcc-newlib/riscv64-unknown-elf/libgloss/libnosys -L/home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/src/newlib-gcc/libgloss/riscv64 -B/home/donnie/freedom-e-sdk/toolchain/riscv64-unknown-elf/bin/ -B/home/donnie/freedom-e-sdk/toolchain/riscv64-unknown-elf/lib/ -isystem /home/donnie/freedom-e-sdk/toolchain/riscv64-unknown-elf/include -isystem /home/donnie/freedom-e-sdk/toolchain/riscv64-unknown-elf/sys-include
checking for suffix of object files… configure: error: in /home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-gcc-newlib/riscv64-unknown-elf/libgcc': configure: error: cannot compute suffix of object files: cannot compile Seeconfig.log’ for more details.
Makefile:11683: recipe for target ‘configure-target-libgcc’ failed
make[3]: *** [configure-target-libgcc] Error 1
make[3]: Leaving directory '/home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-gcc-newlib’
Makefile:872: recipe for target ‘all’ failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain/build-gcc-newlib’
Makefile:254: recipe for target ‘stamps/build-gcc-newlib’ failed
make[1]: *** [stamps/build-gcc-newlib] Error 2
make[1]: Leaving directory '/home/donnie/freedom-e-sdk/work/riscv32-gnu-toolchain’
Makefile:65: recipe for target ‘/home/donnie/freedom-e-sdk/toolchain/bin/riscv32-unknown-linux-gnu-gcc’ failed
make: *** [/home/donnie/freedom-e-sdk/toolchain/bin/riscv32-unknown-linux-gnu-gcc] Error 2

No worries about nagging! Glad that you are beta testing for us.

For me, when I want to do a full re-build of the tools, I delete the ‘work’ and ‘toolchain’ directories. That is where all the actual compilation happens.

If it is taking hours for your toolchain to compile on a VM, there are lots of things you can do to significantly speed it up.
On my Ubuntu VM, I bumped up the RAM allocation, gave it access to 2 CPUs, and I use paralell make (if I try to do this without giving it more resources, it generally runs out of RAM):

make -j4 tools

This cut my compilation time from hours to 10 or 15 minutes.

Also, make sure to do:

git submodule update --init --recursive

to get the correct versions of the tools before compiling.

Thanks for the tips. I had been using 4GB RAM and 2 CPUs till now. I moved it up to 5GB and 3 CPUs and performed the make with -j4 parameter as you suggested. The make took “only” 50 minutes, and was successful. I wish I could get Cygwin to compile as fast. I guess I will have to move to a machine with more resources.

The software make was also successful.

I will now go and try it under Cygwin.

Best regards,

Hi Megan,

After some research and testing, it became clear to me that the problem with symlinks was not within Cygwin, but rather the result of the default parameter symlinks=false in Git. I changed the parameter to symlinks=true and performed a fresh clone and confimred that the symlinks are now functional. However, when attempting to make demo_gpio I am still getting an error:

Can you offer any insight on this?

Thanks and regards,

Ah, thanks Donnie. That was our mistake, I made a change for the HiFive1 board that I didn’t make in the Arty Dev Kit. I’ve pushed the fixes to the freedom-e-sdk repo master branch. Please try it out (you should not need to rebuild your toolchain).