First off, /dev/ttyACM0 et al are owned by group uucp, of which I am a member. I can access it from a screen session no problem.
So I look at the getting started guide. Apparently I need the toolchain; it’s only available for Ubuntu 14.04 (which is EOL, might I add) but I can make it “work” with ncurses ABI 5 compat libs. I install it, set RISCV_PATH. I then also learn from the freedom-e-sdk I need to download openocd and set RISCV_OPENOCD_PATH. I do that too. Both are set. I recursively clone freedom-e-sdk. I do the following:
$ make BSP=metal PROGRAM=hello target=sifive-hifive1-revb software
Build goes through fine. Wew.
Now I try to upload it:
$ make BSP=metal PROGRAM=hello target=sifive-hifive1-revb upload
scripts/upload --elf /home/fratti/Projekte/freedom-e-sdk/software/hello/debug/hello.elf --openocd /home/fratti/riscv-openocd-0.10.0-2019.02.0-x86_64-linux-ubuntu14/bin/openocd --gdb /home/fratti/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb --openocd-config bsp/sifive-hifive1/openocd.cfg
/home/fratti/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb: /usr/lib/libncurses.so.5: no version information available (required by /home/fratti/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb)
/home/fratti/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb: /usr/lib/libncurses.so.5: no version information available (required by /home/fratti/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb)
/home/fratti/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb: /usr/lib/libncurses.so.5: no version information available (required by /home/fratti/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb)
/home/fratti/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb: /usr/lib/libncurses.so.5: no version information available (required by /home/fratti/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb)
/home/fratti/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb: /usr/lib/libncurses.so.5: no version information available (required by /home/fratti/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb)
Open On-Chip Debugger 0.10.0+dev-g672ef66-dirty (2019-03-06-06:00)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 10000 kHz
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description 'Dual RS232-HS', serial '*' at bus location '*'
localhost:3333: Connection timed out.
"monitor" command not supported by this target.
"monitor" command not supported by this target.
You can't do that when your target is `exec'
"monitor" command not supported by this target.
"monitor" command not supported by this target.
Thanks I love it. No, running it as root doesn’t help either, it’s not a permissions issue.
Here’s the lsusb output:
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8087:0a2b Intel Corp.
Bus 001 Device 002: ID 064e:3410 Suyin Corp.
Bus 001 Device 007: ID 1366:1051 SEGGER
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
So a few questions:
- Why is the “Getting Started” guide completely omitting OpenOCD?
- Why do you only provide toolchains for things that have been released back when Obama was still in office?
- Why is this refusing to upload? Even doing the drag and drop thing of the hex onto the board gives a nice FAIL.txt with “Address from datafile not in target flash” as the reason.