FreedomStudio HiFive1 revB getting started fail... help

(Ty) #1

Hi, I’ll start by admitting I really don’t know what I’m doing and I need some gentle assistance that doesn’t assume I’ve done stuff like this before. I have a HiFive1 revision B development kit and I’m working my way through the getting started guide. note: I’m using Ubuntu 18.04 in VmWare on MacOS 10.13

The HiFive1 getting started, in section 7.2, sends me off to the FreedomStudio documentation. The FreedomStudio documentation lands me with 2 problems:

problem 1. when I open FreedomStudio it offers to guide me through my first project. When I select yes I get this error:

Error loading cheat sheet content. Cheat sheet content file ‘cheat-sheets/freedom-e-sdk-project.xml’ not found.

The console window shows the something may be wrong with the auto-configured setup:

Welcome to Freedom Studio!

Installation root: /home/ty/FreedomStudio

Toolchain: /home/ty/FreedomStudio/SiFive/toolchain/riscv64-unknown-elf-gcc-8.2.0-2019.02.0
specified in global preferences

Freedom E SDK: /home/ty/FreedomStudio/SiFive/freedom-e-sdk/freedom-e-sdk-v201903
specified in global preferences

OpenOCD: /home/ty/FreedomStudio/SiFive/openocd/riscv-openocd-0.10.0-2019.02.0/bin/openocd
specified in global preferences

SEGGER J-Link: /home/ty/FreedomStudio/SiFive/jlink/jlink-6.44.0-2019.03.0/JLinkGDBServerCLExe
specified in global preferences

make command:
Cannot run program “make” (in directory “/home/ty/FreedomStudio/SiFive/freedom-e-sdk/freedom-e-sdk-v201903”): error=2, No such file or directory

Is the cheat-sheets folder meant to exist, because it isn’t in my installation? I have no idea why make can’t run. I am using a clean install of Ubuntu Desktop; perhaps I’m missing something? If I type make --h in terminal it tells me the make command is not found.

problem 2. the Freedom Studio documentation Linux Board Setup section directs me to put 99-openocd.rules in /etc/udev/rules.d/ to fix permissions for the debug interface. It’s contents are:

ty@ubuntu:/etc/udev/rules.d$ cat 99-openocd.rules
SUBSYSTEM==“tty”, ATTRS{idVendor}==“0403”,ATTRS{idProduct}==“6010”, MODE=“664”, GROUP=“plugdev”
SUBSYSTEM==“tty”, ATTRS{idVendor}==“15ba”,ATTRS{idProduct}==“002a”, MODE=“664”, GROUP=“plugdev”
SUBSYSTEM==“usb”, ATTR{idVendor}==“0403”,ATTR{idProduct}==“6010”, MODE=“664”, GROUP=“plugdev”
SUBSYSTEM==“usb”, ATTR{idVendor}==“15ba”,ATTR{idProduct}==“002a”, MODE=“664”, GROUP=“plugdev”

When I plug in the HiFive1 board using USB and use lsusb in terminal I get this:

ty@ubuntu:/etc/udev/rules.d$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 1366:1051 SEGGER
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

I really don’t know how this stuff works but I’m guessing that the SEGGER ID (1366:1051) isn’t in the 99-openocd.rules file… The problem is that I don’t end up with a file any /dev/ttyUSB* files; which the documentation wants me to have.

Any suggestions on how to fix both of these problems would be a wonderful help.

(Erik Eidt) #2

I had the same problem yesterday, and eventually I changed the build mechanism from external to “internal” and got further (but then had another error, can’t find main during linking)

(Ty) #3

I fixed part of problem 1, the problem with make, by installing the standard Ubuntu development tools:

ty@ubuntu:~$ sudo apt-get update
ty@ubuntu:~$ sudo apt-get install build-essential

This results in the Freedom Studio console window showing this at the end:

make command: /usr/bin/make

program-list: hello example-itim software-interrupt timer-interrupt local-interrupt return-fail return-pass example-pmp example-spi empty sifive-welcome dhrystone

bsp-list: coreip-e20-arty coreip-e20-rtl coreip-e21-arty coreip-e21-rtl coreip-e24-arty coreip-e24-rtl coreip-e31-arty coreip-e31-rtl coreip-e34-arty coreip-e34-rtl coreip-e76-arty coreip-e76-rtl coreip-s51-arty coreip-s51-rtl coreip-s54-arty coreip-s54-rtl coreip-s76-arty coreip-s76-rtl freedom-e310-arty sifive-hifive1 sifive-hifive1-revb

I can only assume this output means that Freedom Studio is configured correctly.

(Ty) #4

problem 2 fixed.
I read the getting started guide incorrectly and skipped all of section 6 since I am using Freedom Studio; instead of only skipping section 6.1.
A clean install of Ubuntu Desktop 18.04.2 gets up and running quickly as long as you install the developer tools and the screen application as prerequisites.

This is how to do it quickly: quick start hifive1 revB

(Ty) #5

I found that using VmWare fusion is problematic with JLink. I have since swapped to a USB install of Ubuntu and made it a few steps closer to having a working development environment - not there yet though so I’ll post another topic for my latest problems…

(Penguin) #6

Why are you trying to run it on ubuntu at all when you have a platform (mac) that it will run fine on??

(Ty) #7

I use my Mac as my main computer and I have found that developer tools often need more security privileges than I trust them with; so I develop inside a virtual machine. Also, if I break a development VM it’s easy to rebuild. This is the first time a VM has caused problems so I’m trying dual booting. Ubuntu is the Linux I’m most familiar with so it seems like the least path of resistance. I really don’t want to be stuck troubleshooting what I naively think should be a simple, repeatable procedure.

(Penguin) #8

Gotcha. Thats perfectly understandable. I was just curious.