Building Hello World on Freedem-E-SDK fails with "unknown CSR `mtvt'"


Hi, newbie here, I’m just trying to get started with Freedom-E-SDK. Building the Hello World example fails a few steps into the build process with the following:

…/freedom-e-sdk/freedom-metal/src/drivers/riscv,cpu.c: Assembler messages:
…/freedom-e-sdk/freedom-metal/src/drivers/riscv,cpu.c:139: Error: unknown CSR mtvt' .../freedom-e-sdk/freedom-metal/src/drivers/riscv,cpu.c:161: Error: unknown CSRmtvt’
…/freedom-e-sdk/freedom-metal/src/drivers/riscv,cpu.c:165: Error: unknown CSR `mtvt’
Makefile:1010: recipe for target ‘src/drivers/libriscv__mmachine__sifive-hifive1_a-riscv,cpu.o’ failed
make[1]: *** [src/drivers/libriscv__mmachine__sifive-hifive1_a-riscv,cpu.o] Error 1
make[1]: Leaving directory ‘…/freedom-e-sdk/bsp/sifive-hifive1/build/debug’
scripts/ recipe for target ‘…/freedom-e-sdk/bsp/sifive-hifive1/install/lib/debug/stamp’ failed
make: *** […/freedom-e-sdk/bsp/sifive-hifive1/install/lib/debug/stamp] Error 2

Any help on that would be greatly appreciated.

(Jim Wilson) #2

You have to use a SiFive toolchain, because freedom-e-sdk requires support for the proposed CLIC extension, which is only supported in SiFive toolchains currently, because it is still a proposal. mtvt is one of the CSRs added by the CLIC extension.

CLIC support is needed even if you are building for a target that doesn’t support the CLIC extension. There is an open issue for that problem, reported against freedom-metal I think.

You can download binaies from our web site. Or you can check out our repo and use that to build a compiler.

Issues uploading code to Hifive1 revb via jlink

Thx. I can’t build the SiFive toolchain. I’ll put that in another question.