As building the RISC-V toolchain was taking so long on my Raspberry Pi, and it filled up a 16Gb SD card and @TomV was making fun of me for using a Raspberry Pi for development, I decided to use my Ubuntu 16.04 desktop to build icicle and the RISC-V toolchain.
(Also the SD card on my Raspberry Pi started getting disk errors and eventually became corrupt, so I had to build a new image on a different card).
It seems a good idea to build the newlib rather than linux version of the RISC-V toolchain as that is sufficient and is smaller and builds more quickly.
I built it all OK and ran make .. dfu-flash, and that is when the fun started.
The program ran for a few second and then stopped and all LED lights went out apart from the end red one.
I tried reinstalling iceboot and erasing flash memory, but similar things were happening on all programs. I was getting "device or resource busy" messages on /dev/ttyACM0 and "rbits failed" messages from iceboot.
I thought that the Blackice device was broken but after I got my Raspberry Pi working again, it worked fine on that.
I eventually tracked the problem down to a package called modemmanager running on Ubuntu. It was writing data to /dev/ttyACM0 which was causing the device to be busy and iceboot to give errors. I uninstalled modemmanager and all is fine now and icicle runs perfectly,
I don't know why modemmanager was installed. I didn't install it, so either it comes by default with Ubuntu or some other package installed it.