We’re working to complete our SDK integration for MultiZone Security - the first Trusted Execution environment for RISC-V - and have run into some issues with the precompiled toolchain on Ubuntu 18.04.
Following the install guide:
- clone the git repository
- download the risc-v tools and openocd
- update the variables for RISCV_PATH and RISCV_OPENOCD_PATH
- make clean (which works)
- make software (which works)
- make upload which produces two errors
/home/dbarnets/riscv-openocd-20180928-x86_64-linux-ubuntu14/bin/openocd -f bsp/env/freedom-e300-hifive1/openocd.cfg &
/home/dbarnets/riscv64-unknown-elf-gcc-20180928-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb software/demo_gpio/demo_gpio --batch -ex “set remotetimeout 240” -ex “target extended-remote localhost:3333” -ex “monitor reset halt” -ex “monitor flash protect 0 64 last off” -ex “load” -ex “monitor resume” -ex “monitor shutdown” -ex “quit” &&
echo “Successfully uploaded ‘demo_gpio’ to freedom-e300-hifive1.”
/home/dbarnets/riscv-openocd-20180928-x86_64-linux-ubuntu14/bin/openocd: error while loading shared libraries: libftdi1.so.2: cannot open shared object file: No such file or directory
/home/dbarnets/riscv64-unknown-elf-gcc-20180928-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
The libftdi1.so.2 error is a library that does not appear to be bundled with the precompiled GNU toolchain - it is in Freedom Studio however. I’m not srue if this issue is unique to 18.04 or a broader dependency issue.
The libmpfr.so.4 error is more problematic - Ubuntu stopped bundling this package with 18.04, thus it seems the only fixes are to do a symbolic link (which is a bit of a hack) or to recompile the toolchain in Ubuntu (which I did and works fine but takes a long time).
Any solutions to make the precompiled toolchain work with Ubuntu 18.04?