# Can't program my HiFive1 board

**URL:** https://forums.sifive.com/t/cant-program-my-hifive1-board/239
**Category:** HiFive1 Rev B
**Created:** [January 2, 2017, 4:43pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239 "2017-01-02T16:43:06Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![proteusguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/proteusguy/32/848_2.png) [@proteusguy](https://forums.sifive.com/u/proteusguy)
#### Post date: [January 2, 2017, 4:43pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/1 "2017-01-02T16:43:06Z")

</div>

Board comes up just fine. Attaching to the /dev/ttyUSB1 via screen /dev/ttyUSB1 115200 works per the getting started docs. I see the logo display, enter ‘y’, and it says ‘PASS’.

I can compile the programs but uploading fails. Both at command line and via arduino ui. Here’s a sample session:

scherrey@squire:~/develop/risc-v/freedom-e-sdk$ lsusb  
Bus 006 Device 002: ID 8087:8001 Intel Corp.  
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub  
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  
Bus 005 Device 002: ID 8087:8009 Intel Corp.  
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub  
Bus 001 Device 003: ID 093a:2521 Pixart Imaging, Inc. Optical Mouse  
Bus 001 Device 002: ID 0566:3067 Monterey International Corp.  
Bus 001 Device 004: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC  
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

scherrey@squire:~/develop/risc-v/freedom-e-sdk$ dir /dev/ttyUS\*  
crw-rw-r-- 1 root plugdev 188, 0 Jan 2 23:22 /dev/ttyUSB0  
crw-rw-r-- 1 root plugdev 188, 1 Jan 2 23:34 /dev/ttyUSB1

scherrey@squire:~/develop/risc-v/freedom-e-sdk$ groups  
scherrey adm dialout cdrom sudo dip plugdev lpadmin sambashare docker

scherrey@squire:~/develop/risc-v/freedom-e-sdk$ make upload PROGRAM=dhrystone BOARD=freedom-e300-hifive1  
/home/scherrey/develop/risc-v/freedom-e-sdk/bsp/tools/openocd\_upload.sh /home/scherrey/develop/risc-v/freedom-e-sdk/software/dhrystone/dhrystone /home/scherrey/develop/risc-v/freedom-e-sdk/bsp/env/freedom-e300-hifive1/openocd.cfg

- openocd -f /home/scherrey/develop/risc-v/freedom-e-sdk/bsp/env/freedom-e300-hifive1/openocd.cfg -c ‘flash protect 0 64 last off; program /home/scherrey/develop/risc-v/freedom-e-sdk/software/dhrystone/dhrystone verify; resume 0x20400000; exit’
- tee openocd\_upload.log  
Open On-Chip Debugger 0.10.0-dev-g193f630 (2017-01-02-22:38)  
Licensed under GNU GPL v2  
For bug reports, read  
[http://openocd.org/doc/doxygen/bugs.html](http://openocd.org/doc/doxygen/bugs.html)  
adapter speed: 10000 kHz  
Info : auto-selecting first available session transport “jtag”. To override use 'transport select '.  
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 '_’

scherrey@squire:~/develop/risc-v/freedom-e-sdk$

Any ideas?

---

<div class="post-metadata">

### Author: ![dagema](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/dagema/32/59_2.png) [@dagema](https://forums.sifive.com/u/dagema)
#### Post date: [January 2, 2017, 5:00pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/2 "2017-01-02T17:00:10Z")

</div>

Post retracted.

---

<div class="post-metadata">

### Author: ![sflin](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sflin](https://forums.sifive.com/u/sflin)
#### Post date: [January 2, 2017, 5:51pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/3 "2017-01-02T17:51:03Z")

</div>

Same error message with mine. Try sudo.  
See my post in [HiFive1 Getting Started Guide and Other Docs are available!](http://forums.sifive.com/t/hifive1-getting-started-guide-and-other-docs-are-available/197/14) for more details.

---

<div class="post-metadata">

### Author: ![tommythorn](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@tommythorn](https://forums.sifive.com/u/tommythorn)
#### Post date: [January 2, 2017, 5:55pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/4 "2017-01-02T17:55:14Z")

</div>

I had the same symptoms, but I just tried again until it worked. Later I discovered that the USB cable I used is marginal, but I haven’t checked if it another worked better.

---

<div class="post-metadata">

### Author: ![dgrubb](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/dgrubb/32/23_2.png) [@dgrubb](https://forums.sifive.com/u/dgrubb)
#### Post date: [January 2, 2017, 10:40pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/5 "2017-01-02T22:40:17Z")

</div>

> [@tommythorn](#):
>
> I had the same symptoms, but I just tried again until it worked. Later I discovered that the USB cable I used is marginal, but I haven’t checked if it another worked better.

Bit of a longshot, but adding a user to a group requires them to log out and back in again to pick up the new permissions. Could that have been what happened to you?

That probably needs to be noted in the Getting Start guide.

---

<div class="post-metadata">

### Author: ![tommythorn](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@tommythorn](https://forums.sifive.com/u/tommythorn)
#### Post date: [January 2, 2017, 10:52pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/6 "2017-01-02T22:52:46Z")

</div>

You don’t have to log out. Just run newgrp to gain access to the group.

---

<div class="post-metadata">

### Author: ![sflin](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sflin](https://forums.sifive.com/u/sflin)
#### Post date: [January 3, 2017, 2:42am UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/7 "2017-01-03T02:42:47Z")

</div>

I logged out and back in as documented in the Getting Started Guide. But I need sudo to upload a program.

I’m using a fresh Ubuntu in VMware as I reported in [HiFive1 Getting Started Guide and Other Docs are available!](http://forums.sifive.com/t/hifive1-getting-started-guide-and-other-docs-are-available/197/14).

---

<div class="post-metadata">

### Author: ![proteusguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/proteusguy/32/848_2.png) [@proteusguy](https://forums.sifive.com/u/proteusguy)
#### Post date: [January 3, 2017, 4:09am UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/8 "2017-01-03T04:09:53Z")

</div>

I got the same result. Rebooted the host computer completely. I can access the ttyUSB just fine as my regular user but I still require sudo to actually upload the program. Happily I can now program my SiFive - but I’m curious why it requires root privileges to upload.

many thanx!

– Ben Scherrey

---

<div class="post-metadata">

### Author: ![neo\_ar](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/neo_ar/32/792_2.png) [@neo\_ar](https://forums.sifive.com/u/neo_ar)
#### Post date: [January 3, 2017, 7:04pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/9 "2017-01-03T19:04:21Z")

</div>

Interesting, it is kind of the opposite on arch linux. I was able to upload programs to my hifive1 without sudo without adding myself to a group. Accessing the ttyUSB device did require root privs however (such as when connecting with GNU screen). Arch gives it the group uucp, so after adding myself to that group I don’t need sudo for anything at all when working with the hifive1. No special udev rules or anything

---

<div class="post-metadata">

### Author: ![rxia](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@rxia](https://forums.sifive.com/u/rxia)
#### Post date: [January 3, 2017, 9:30pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/10 "2017-01-03T21:30:11Z")

</div>

I noticed that there’s actually a typo in the Getting Started Guide’s udev rules code snippet. The word “SUSBSYSTEM” should actually be “SUBSYSTEM” (this occurs twice in the snippet). If you fix that typo, then I believe you should be able to run `make upload` without sudo.

Sorry for all the confusion this caused; I’ll update the guide shortly.

---

<div class="post-metadata">

### Author: ![sflin](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@sflin](https://forums.sifive.com/u/sflin)
#### Post date: [January 4, 2017, 1:15am UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/11 "2017-01-04T01:15:46Z")

</div>

Now I can upload without sudo. Thanks!

---

<div class="post-metadata">

### Author: ![orco](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/orco/32/902_2.png) [@orco](https://forums.sifive.com/u/orco)
#### Post date: [November 17, 2017, 9:51pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/12 "2017-11-17T21:51:21Z")

</div>

Hi,  
Probably is not the right thread, but instead of opening one, this is somewhat related.  
I cannot per the _getting started/freedom studio manual_ communicate with the board using screen.  
I am in the plugdev group in my work station, but when I type  
`screen /dev/ttyUSB1 115200`

I don’t see anything at all back. I was expecting to see tha HiFive Logo somewhere which is not the case. I’ll appreciate your help on this. Thanks,

---

<div class="post-metadata">

### Author: ![mwachs5](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/mwachs5/32/13_2.png) [@mwachs5](https://forums.sifive.com/u/mwachs5)
#### Post date: [November 17, 2017, 9:53pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/13 "2017-11-17T21:53:17Z")

</div>

When you provide power to the board, do you see the RGB LED cycling through a fade pattern (this is a check to make sure it is running the demo SW).

---

<div class="post-metadata">

### Author: ![orco](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/orco/32/902_2.png) [@orco](https://forums.sifive.com/u/orco)
#### Post date: [November 17, 2017, 10:20pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/14 "2017-11-17T22:20:27Z")

</div>

Yes, I do see the color pattern. Furthermore, `lsusb` gives me

`Bus 002 Device 009: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC`

Thanks,

---

<div class="post-metadata">

### Author: ![mwachs5](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/mwachs5/32/13_2.png) [@mwachs5](https://forums.sifive.com/u/mwachs5)
#### Post date: [November 17, 2017, 10:37pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/15 "2017-11-17T22:37:14Z")

</div>

Once you connect with screen, do you press the RESET button? The message only appears just after RESET.

---

<div class="post-metadata">

### Author: ![orco](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/orco/32/902_2.png) [@orco](https://forums.sifive.com/u/orco)
#### Post date: [November 17, 2017, 11:06pm UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/16 "2017-11-17T23:06:52Z")

</div>

ok, got it! Somehow it was not evident from the instructions that I had to press RESET 😁

Thanks, @mwachs5!

---

<div class="post-metadata">

### Author: ![hoki](https://avatars.discourse-cdn.com/v4/letter/h/65b543/32.png) [@hoki](https://forums.sifive.com/u/hoki)
#### Post date: [October 22, 2019, 11:06am UTC](https://forums.sifive.com/t/cant-program-my-hifive1-board/239/17 "2019-10-22T11:06:08Z")

</div>

Yes, I was also baffled by this. In hindsight, it makes sense. Would be good to include pressing the RESET button in the documentation IMHO…
