I have got icosoc working on the Blackice II, but it is a bit delicate at the moment.
I used Tom's uart code to replace the Raspberry Pi interface but it only works if I remove most of the console output from the bootloader. Execution of the console output causes characters to be lost from the uart input. I think it needs a fifo like the Raspberry Pi interface has.
But with that proviso, I have the system working. The binary is loaded in the normal way by copying to /dev/ttyACM0 and then the user program (in hex format) is copied to /dev/ttyUSB0. The way the bootloader currently works, you then have to write a binary zero to /dev/ttyUSB0 to make it run the program.
I need to do a lot of tidying up. I think I will start a new project - blacksoc - as there are so many differences to icosoc that I don't think a fork of the icotools repository is sensible.
The current code is at:
So the scheme this uses is:
The bootloader is included in the binary as a hex file - firmware_seed.hex
It is loaded into BRAM and executed.
It writes a prompt to the console (uart) "Bootloader >".
It reads the application hex file from the uart and then jumps to it.
You need to set /dev/ttyUSBO to -echo raw 115200. You then cat application.hex to it and then send a zero byte to say it has finished, e,g. "echo -n -e \0 >/dev/ttyUSB0". You can view the console by cat /dev/ttyUSB0.
You need to build the Riscv32 tools as described in the icosoc README. There are 4 variants. The variant to use is chosen by the options in the .cfg file for the application. I had to remove the compressed option as I have not built the toolchain for the compressed option. (Building all 4 is trivial - it just takes time).
The board name in the cfg file must be blackice2. To work for blackice 1 changes would be needed in the icosoc.py file. The system is not really set up for multiple boards at the moment.
None of the flash memory or flashboot options work for blackice, and the debug option probably doesn't work.
You need a 32x32 LED panel for some of the examples, such as "hanoi".