Arduino upload fails w/ various openocd errors

does anyone know what versions of windows and/or ubuntu, arduino & the HiFive1 BSP are known to work?

i’m using ubuntu 14.04 on an AMD 64 bit system, arduino 1.8.1 and v1.0.2 of the BSP.

following the instructions on the getting started doc, i tried to upload the blink example, but got an error indicating that openocd didn’t understand what riscv was (it told me to try using various varieties of ARM.)

  1. was i supposed to install the freedom-e-sdk first? the documentation seemed to imply this was done automagically as a side effect of selecting the board in the board manager.

  2. is this process known to work on ubuntu or am i supposed to be running windows? if so, what version of windows?

  3. is this process known to work on AMD systems? it can’t possibly be tied to CPU architecture of the dev system, can it?

any help would be appreciated, even it it’s just a response to say "yes. i got this working w/ arduino version and leenucks version "


(in related news, the process fails slightly differently when working on an armhf-linux system. if anyone’s gotten it to work on a raspi, beaglebone or Exynos board, i’d love to hear about it…)

From your description, it sounds like Arduino SW is not properly using the right version of OpenOCD, it’s trying to use the builtin one instead of the one that you installed with the SiFive BSP.

Can you double check that you selected all 3 of these options, in this order (sometimes one will get unset by changing another):

Tools->Install Location -> Default
Tools->Programmer->SiFive OpenOCD

And, this process is best known to run on Ubuntu :slight_smile: I can also use macOS but the FTDI drivers are harder to deal with there.

If you wanted to run on Windows, the best thing to do is install Ubuntu in a VM, that is how we actually do the majority of our testing.

Thx! After dinner I got thinking again. Turns out I had a different version of openocd in the path before the one distributed with the HiFive1 BSP. After manipulating the path, double-checking changes to various config files and rebooting, everything seems to be working fine (though obviously I have to install the freedom-e-sdk BSP manually, and configure the path appropriately before starting the arduino app.)

Yeah. WIndows? no thanks. It was fine when it was VMS, but now it seems like a collection of special cases and weird bugs. Unlike linux, which is by definition perfect and without flaw. Seriously though, as long as linux is a supported platform, I’ll stick with it. I’m much more comfortable with it’s special cases and weird bugs.

I like the way you think. I remember when NT 3.5.1 came out and someone made me use it … hmm, same old Windows API shit, with X on the end, and … hello? … this stuff under it looks familiar from the 80s…

I’m using Ubuntu 16.04 on a homebuilt Skylake thingy. I hadn’t thought to try it on an ARM board … might give it a try. I don’t have a Beagle, but I’ve got Pi2, Pi3, XU4 and C2. None of which have KBs or monitors on them lol … but I can try command line with the SDK. Also MBP 17" quad core (cold dead hands, etc etc) which I should try so I can take this stuff to meetings and show it off. Everyone loves Dr Who, right?

Cutler at first paid no attention to the testers except to grumble that “not only do we have a test group, it looks like it’s going to be a big test group.” Cutler had never relied on testers at Digital and considered them superflous. “It’s great to have a test group, but we probably won’t need that anyway since the code will be of such [high] quality,” he thought.
- Show-Stopper: The Breakneck Race to Create Windows NT and the Next Generation at Microsoft, G. Zachary