sifive / freedom-tools

Tools for SiFive's Freedom Platform
217 stars 52 forks source link

Error:libusb_open() while Entering "make flash" in TockOS project #33

Closed bling206 closed 4 years ago

bling206 commented 4 years ago

Hi I try to run TockOS on HiFive1. When I enter the command," make flash", it shows error messages as follow: Error: libusb_open() failed with LIBUSB_ERROR_ACCESS Error: no device found Error: unable to open ftdi device with vid 0403, pid 6010, description 'Dual RS232-HS', serial '' at bus location ''

Here is the screenshot: https://imgur.com/a/tjqptk0

cgsfv commented 4 years ago

OpenOCD needs some extra setup as mentioned on http://openocd.org/doc/html/Running.html. We have some description how to do it in: https://static.dev.sifive.com/dev-tools/FreedomStudio/2019.08/freedom-studio-manual-4.7.2-2019-08-1.pdf

bling206 commented 4 years ago

I can upload the BIN file with the riscv-rust-quickstart project successfully, https://github.com/riscv-rust/riscv-rust-quickstart ,but there is something I missed with the TockOS Project. The Openocd is listening like the picture below: https://imgur.com/a/s2LuYqy.

bling206 commented 4 years ago

I have found the problem. When working on the rust-riscv-quickstart program, I am using a user account to install rustup. This program is used the commands,cargo build and cargo run, so it will be ok. However the TockOS program is used the commands, make and make flash. It will use the root identity while the rustup is installed by a user account not root. Therefore, I try to su to switch to the root and re-install rustup and set up envirnment parameters of root. It is ok to make flash.