Build Error

Hi All,

I am new to RISC-V and try to build E300 Arty Dev Kit project on my Linux machine. I got the errors shown below in the log. I would highly appreciate someone can tell me what went wrong. I have Vivado 2018.1 installed in my home directory. Cloned freedom E SDK to my home directory and built the toolchain.

Thanks,

Charles

cm@cm5558:~/freedom$ make -f Makefile.e300artydevkit mcs
mkdir -p /home/cm/freedom/builds/e300artydevkit/
java -jar /home/cm/freedom/rocket-chip/sbt-launch.jar “runMain freechips.rocketchip.system.Generator /home/cm/freedom/builds/e300artydevkit sifive.freedom.everywhere.e300artydevkit E300ArtyDevKitFPGAChip sifive.freedom.everywhere.e300artydevkit E300ArtyDevKitConfig”
[info] Loading project definition from /home/cm/freedom/project
[info] Loading settings from build.sbt …
[info] Loading settings from plugins.sbt …
[info] Loading project definition from /home/cm/freedom/rocket-chip/project
[info] Loading settings from build.sbt …
[info] Loading settings from build.sbt …
[info] Loading settings from build.sbt …
Using addons:
[error] org.eclipse.jgit.api.errors.JGitInternalException: Missing unknown b731149757b93ddc80e6e4b5483a6931d5f9ad60
[error] at org.eclipse.jgit.api.StatusCommand.call(StatusCommand.java:154)
[error] at com.typesafe.sbt.git.JGit.hasUncommittedChanges(JGit.scala:88)
[error] at com.typesafe.sbt.SbtGit$.$anonfun$buildSettings$20(SbtGit.scala:121)
[error] at com.typesafe.sbt.SbtGit$.$anonfun$buildSettings$20$adapted(SbtGit.scala:121)
[error] at com.typesafe.sbt.git.DefaultReadableGit.withGit(ReadableGit.scala:39)
[error] at com.typesafe.sbt.SbtGit$.$anonfun$buildSettings$19(SbtGit.scala:121)
[error] at com.typesafe.sbt.SbtGit$.$anonfun$buildSettings$19$adapted(SbtGit.scala:121)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.EvaluateSettings$MixedNode.evaluate0(INode.scala:219)
[error] at sbt.internal.util.EvaluateSettings$INode.evaluate(INode.scala:164)
[error] at sbt.internal.util.EvaluateSettings.$anonfun$submitEvaluate$1(INode.scala:87)
[error] at sbt.internal.util.EvaluateSettings.sbt$internal$util$EvaluateSettings$$run0(INode.scala:98)
[error] at sbt.internal.util.EvaluateSettings$$anon$3.run(INode.scala:94)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] Caused by: org.eclipse.jgit.errors.MissingObjectException: Missing unknown b731149757b93ddc80e6e4b5483a6931d5f9ad60
[error] at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:158)
[error] at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:227)
[error] at org.eclipse.jgit.revwalk.RevWalk.parseAny(RevWalk.java:859)
[error] at org.eclipse.jgit.revwalk.RevWalk.parseTree(RevWalk.java:799)
[error] at org.eclipse.jgit.lib.IndexDiff.(IndexDiff.java:315)
[error] at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:556)
[error] at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:377)
[error] at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:559)
[error] at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:377)
[error] at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:559)
[error] at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:377)
[error] at org.eclipse.jgit.api.StatusCommand.call(StatusCommand.java:148)
[error] at com.typesafe.sbt.git.JGit.hasUncommittedChanges(JGit.scala:88)
[error] at com.typesafe.sbt.SbtGit$.$anonfun$buildSettings$20(SbtGit.scala:121)
[error] at com.typesafe.sbt.SbtGit$.$anonfun$buildSettings$20$adapted(SbtGit.scala:121)
[error] at com.typesafe.sbt.git.DefaultReadableGit.withGit(ReadableGit.scala:39)
[error] at com.typesafe.sbt.SbtGit$.$anonfun$buildSettings$19(SbtGit.scala:121)
[error] at com.typesafe.sbt.SbtGit$.$anonfun$buildSettings$19$adapted(SbtGit.scala:121)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.EvaluateSettings$MixedNode.evaluate0(INode.scala:219)
[error] at sbt.internal.util.EvaluateSettings$INode.evaluate(INode.scala:164)
[error] at sbt.internal.util.EvaluateSettings.$anonfun$submitEvaluate$1(INode.scala:87)
[error] at sbt.internal.util.EvaluateSettings.sbt$internal$util$EvaluateSettings$$run0(INode.scala:98)
[error] at sbt.internal.util.EvaluateSettings$$anon$3.run(INode.scala:94)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] org.eclipse.jgit.api.errors.JGitInternalException: Missing unknown b731149757b93ddc80e6e4b5483a6931d5f9ad60
[error] Use ‘last’ for the full log.
Project loading failed: ®etry, (q)uit, (l)ast, or (i)gnore?

Reading your error messages, git support in Java seems to be failing to find commit b731149757b93ddc80e6e4b5483a6931d5f9ad60.

Doing a google search for that hash, I find it corresponds to a riscv-gcc commit for gcc 7.2.0 on branch riscv-gcc-7.2.0.

Perhaps when you cloned Freedom E SDK you didn’t include the --recursive option?

1 Like

Hi Bruce,

Thank you very much for your help. I executed the commands copied from the Readme file and there’s a recursive option in the command. The clone took quite long time and I let it run overnight. Maybe there was some unsuccessful operation I didn’t notice.

What’s your suggestion for next step? Should I clone it again or just download the source instead of clone? Or just downloading pre-built RISC-V toolchain is enough?

Thanks,

Charles

pre-built RISC-V toolchain

1 Like

Liviu’s suggestion is a reasonable one, but if you’d still like to build it yourself then it’s much much better to show us the exact commands you ran, rather than just describe them, or just show the last one. There are so many things that can go wrong in any software build that we can’t help much unless we can reproduce your problem ourselves.

1 Like

A fully checked out source tree is about 6GB. If you cd into the riscv-gcc dir, “ls” should show files in there, and “git status” should not report any error. Also, “git status” in the top level dir should not report any error.

1 Like

Jim,

Thanks for the info, but I did a clone again and the source tree is only 3.3GB. What am I missing? I ued the following command:
git clone --recursive https://github.com/sifive/freedom-e-sdk.git

I also did “git status” on both folders your mentioned and no error found. I will rebuild the toolchain again. Let you know if it works this time.

Thanks,

Charles

Hi All,

Thank you all for your inputs. After recursively clone freedom project, the original problem is gone. However, make complains there’s no dtc command as shown below:

make -C /home/cm/freedom/bootrom/xip romgen
make[1]: Entering directory '/home/cm/freedom/bootrom/xip’
dtc -I dts -O dtb -o /home/cm/freedom/builds/e300artydevkit/sifive.freedom.everywhere.e300artydevkit.E300ArtyDevKitConfig.dtb /home/cm/freedom/builds/e300artydevkit/sifive.freedom.everywhere.e300artydevkit.E300ArtyDevKitConfig.dts
make[1]: dtc: Command not found
Makefile:10: recipe for target ‘/home/cm/freedom/builds/e300artydevkit/sifive.freedom.everywhere.e300artydevkit.E300ArtyDevKitConfig.dtb’ failed
make[1]: *** [/home/cm/freedom/builds/e300artydevkit/sifive.freedom.everywhere.e300artydevkit.E300ArtyDevKitConfig.dtb] Error 127
make[1]: Leaving directory '/home/cm/freedom/bootrom/xip’
common.mk:68: recipe for target ‘/home/cm/freedom/builds/e300artydevkit/sifive.freedom.everywhere.e300artydevkit.E300ArtyDevKitConfig.rom.v’ failed
make: *** [/home/cm/freedom/builds/e300artydevkit/sifive.freedom.everywhere.e300artydevkit.E300ArtyDevKitConfig.rom.v] Error 2

Please advise what could cause this problem and how to solve it. Thanks.

I think I might have been looking at a freedom-u-sdk tree by mistake. freedom-e-sdk is about 3.6GB in my checkout. Except you are building freedom. freedom is about 3.7GB in my checkout. freedom is outside my area, so I won’t be able to help much with that.

You can do “git submodule update --init --recursive” inside a repo to verify that all of the submodules are checked out.

1 Like

dtc is the device-tree-compiler used by the linux kernel. On debian/ubuntu systems you can “sudo apt install device-tree-compiler”. It is probably a similar package name on other linux systems.

1 Like

Jim,

Thanks. DTC problem is solved with your input. Now, it seems Vivado has some complains too:

WARNING: [Device 21-436] No parts matched 'xc7a35ticsg324-1L’
ERROR: [Coretcl 2-106] Specified part could not be found.

while executing

“source [file join $scriptdir “prologue.tcl”]”
(file “/home/cm/freedom/fpga-shells/xilinx/common/tcl/vivado.tcl” line 7)
INFO: [Common 17-206] Exiting Vivado at Fri Jun 29 06:54:59 2018…
common.mk:81: recipe for target ‘/home/cm/freedom/builds/e300artydevkit/obj/E300ArtyDevKitFPGAChip.bit’ failed
make: *** [/home/cm/freedom/builds/e300artydevkit/obj/E300ArtyDevKitFPGAChip.bit] Error 1

I may forget to install Artix architecture when I installed Vivoda. Let me check this first.

Charles