Accessing and Programming RISCV processor on BeagleV-Fire

Hello

I purchased a couple of BeagleV-Fire boards and I want to use the RISCV processor for a start. My target is to execute programs on the processor and conduct experiments. However, I am not getting any clear documentation as how to access and program the processor on the board. I am not sure if I am missing any hardware. I only have the board connected to the laptop using USB-A to USB-C connector and using windows 11 pro. It will be truly helpful if someone could help me to show how I can use the RISCV processor to execute code. Thank you.

Hello and welcome to the forums!

Can you tell us a little about what processors you’re referring to?
The E51 or the U54’s (of which there are four)?

Out of the box, the E51 gets the other U54’s running and boots Linux
through u-boot. Are you looking to do bare-metal coding and replace the HSS?

They’re all RISCV, so it’s a little unclear what you’re asking.

Hi there! It sounds like you’re eager to dive into experimenting with the BeagleV-Fire board and the RISC-V processor. I can share a few suggestions to help you get started.

  1. Check Hardware Requirements: You mentioned that you only have the board connected via a USB-A to USB-C cable. Make sure that the board is powered correctly and that it’s able to communicate with your laptop. In some cases, you may need a separate power supply depending on the board’s requirements. The USB connection should allow you to access the board, but verify whether it’s being detected properly by Windows 11 (check Device Manager to see if the board appears as a connected device).
  2. Set Up Development Environment:
  • Since you’re on Windows 11, you might want to install the Windows Subsystem for Linux (WSL) if you haven’t already. This will give you access to a more familiar Linux-based environment for working with RISC-V.
  • Once you have WSL set up, you can install the RISC-V GNU toolchain. You can follow the official RISC-V toolchain installation guide for instructions. This will allow you to compile and run code for RISC-V.
  1. Communication with the Board:
  • You will also need a serial communication tool like PuTTY or Tera Term to access the board’s serial console from your laptop. These tools will help you interact with the BeagleV-Fire board, upload code, and get output from the RISC-V processor.
  • In most cases, the default baud rate for BeagleV boards should be 115200.
  1. Running Code on RISC-V:
  • After you’ve set up the toolchain, you’ll be able to write and compile simple C programs for the RISC-V processor. You can then load them onto the board via a JTAG debugger or use a bootloader if one is provided with the board.
  • There may also be pre-installed firmware that allows you to run certain programs directly. Check the documentation for your specific BeagleV-Fire board to see how to load and run programs.
  1. BeagleV Resources:
  • You might also want to check out the BeagleV wiki or official GitHub repositories for any specific resources related to the BeagleV-Fire, as there might be some useful scripts or firmware that can help you get started quickly.

If none of these steps work or if you’re looking for something more specific, feel free to share more details, and we can troubleshoot further.

Good luck with your RISC-V experiments!

@foxsquirrel,

Just saw your last two posts…

You feeling alright buddy? I’m worried that you may have been taken over by the ai chatbot mind virus and turned into a zombie bot :face_with_spiral_eyes: controlled by big tech. Be careful out there.

foxsquirrel live:

Thank you for the concern regarding my state of mind.

We are working on a new project and I needed to do some live testing with it. I see the positive and negatives with this and its too early to really drive a conclusive answer as to whether the negative impact is worth it. I like this forum because those that use it are technical and can smell a dead rat, as you and one of the others have already done.

Now this AI:

Thank you for your thoughtful concern. We’re currently engaged in an exciting new project that required some live testing. While it’s still early to determine the full impact, I’m optimistic about the potential and am carefully weighing both the positive and negative aspects. I really value this forum because it’s filled with sharp technical minds, like yourself and others, who quickly identify potential issues and help keep things on track.

@foxsquirrel

Thank you so much for the detailed response.
I can access the board using the serial comm using putty with the mentioned baud rate.
The current issue is that I cannot do any sudo apt updates or install now using the ethernet.
The issue could be with the port itself. But I am also trying to check if there are any configurational changes required to use the ethernet port in the board.
In you post under “Runnin Code on RISC-V” you mentioned that I need to setup toolchain. Can you let me know what toolchains required to be installed to write C and assembly programs? Can I use GCC compiler to build and execute C program on RISC-V? Or do I need to need to write C programs locally and then transfer it to board. I am actually bit confused regarding the steps to follow to write and execute C programs on RISC-V. If you could help me in understanding or point me to some source then that will be really helpful.
I truly appreciate for al your help. Thank you.

Make sure your time is correct, if your ISP has ntp blocked you will have to set it by hand. I am assuming you are getting an error message when doing sudo apt. Also make sure the internet and monitor are connected prior to starting the board. I don’t have that model board and this general troubleshooting techniques. If you cannot connect at all to the internet, post $sudo ifconfig and lets see if the interface is up.

I started noticing it too; strangely disconnected and full of “marketingy-speech”.
I wonder if an Admin can send this account some kind of challenge,
so we can determine if there’s a real live person behind it or if it has indeed been hijacked.

… and yet, this sounds like the good old fox; you ok buddy?

Ok, back on subject, I just wanted to add that in case ifconfig isn’t there anymore,
ip addr will do the same thing.

1 Like

Just old age.

1 Like

yes you are correct. I am getting apt-get update errors. The errors are as follows:

Ign:1 http://ports.ubuntu.com lunar InRelease
Ign:2 Index of /debian-riscv64 lunar InRelease
Ign:3 Directory lunar InRelease
Ign:4 http://ports.ubuntu.com lunar-security InRelease
Ign:5 http://ports.ubuntu.com lunar-updates InRelease
Ign:1 http://ports.ubuntu.com lunar InRelease
Ign:3 Directory lunar InRelease
Ign:2 Index of /debian-riscv64 lunar InRelease
Ign:4 http://ports.ubuntu.com lunar-security InRelease
Ign:5 http://ports.ubuntu.com lunar-updates InRelease
Ign:1 http://ports.ubuntu.com lunar InRelease
Ign:3 Directory lunar InRelease
Ign:2 Index of /debian-riscv64 lunar InRelease
Ign:4 http://ports.ubuntu.com lunar-security InRelease
Ign:5 http://ports.ubuntu.com lunar-updates InRelease
Err:1 http://ports.ubuntu.com lunar InRelease
Temporary failure resolving ‘ports.ubuntu.com’
Err:3 Directory lunar InRelease
Temporary failure resolving ‘debian.beagleboard.org’
Err:2 Index of /debian-riscv64 lunar InRelease
Temporary failure resolving ‘repos.rcn-ee.com’
Err:4 http://ports.ubuntu.com lunar-security InRelease
Temporary failure resolving ‘ports.ubuntu.com’
Err:5 http://ports.ubuntu.com lunar-updates InRelease
Temporary failure resolving ‘ports.ubuntu.com’
Reading package lists… Done
W: Failed to fetch http://ports.ubuntu.com/dists/lunar/InRelease Temporary failure resolving ‘ports.ubuntu.com’
W: Failed to fetch http://ports.ubuntu.com/dists/lunar-security/InRelease Temporary failure resolving ‘ports.ubuntu.com’
W: Failed to fetch http://ports.ubuntu.com/dists/lunar-updates/InRelease Temporary failure resolving ‘ports.ubuntu.com’
W: Failed to fetch http://debian.beagleboard.org/riscv64/dists/lunar/InRelease Temporary failure resolving ‘debian.beagleboard.org’
W: Failed to fetch http://repos.rcn-ee.com/debian-riscv64/dists/lunar/InRelease Temporary failure resolving ‘repos.rcn-ee.com’
W: Some index files failed to download. They have been ignored, or old ones used instead.

Here is the sudo ifconfig outcome:

docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:b9:63:80:a4 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::204:a3ff:fed2:3a40 prefixlen 64 scopeid 0x20
ether 00:04:a3:d2:3a:40 txqueuelen 1000 (Ethernet)
RX packets 3994 bytes 297813 (297.8 KB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 36 bytes 6849 (6.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 53

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 1937 bytes 138836 (138.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1937 bytes 138836 (138.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.7.2 netmask 255.255.255.0 broadcast 192.168.7.255
inet6 fe80::204:a3ff:fed2:3a43 prefixlen 64 scopeid 0x20
ether 00:04:a3:d2:3a:43 txqueuelen 1000 (Ethernet)
RX packets 119 bytes 13292 (13.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 42 bytes 8852 (8.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

@lranders

Thanks for your response and helping me out. The outcome of sudo ip addr is given below:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:04:a3:d2:3a:40 brd ff:ff:ff:ff:ff:ff
inet6 fe80::204:a3ff:fed2:3a40/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:04:a3:d2:3a:3f brd ff:ff:ff:ff:ff:ff
altname end0
4: ip6tnl0@NONE: mtu 1452 qdisc noop state DOWN group default qlen 1000
link/tunnel6 :: brd :: permaddr faef:cd24:c97e::
5: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:04:a3:d2:3a:43 brd ff:ff:ff:ff:ff:ff
inet 192.168.7.2/24 brd 192.168.7.255 scope global usb0
valid_lft forever preferred_lft forever
inet6 fe80::204:a3ff:fed2:3a43/64 scope link
valid_lft forever preferred_lft forever
6: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:b9:63:80:a4 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever

Please let me know if further information is needed. All your help is truly appreciated. Thanks.

Is your network on IP6 only. Typically, not always, it will show an IP4 192.xxx.xxx.xxx addresss for eth0.
Go to another box connected to the same router/gateway and repeat the $ip a and see what that routing looks like. Your BBV should be similar, if not you have a config issue on the BBV. I don’t believe this is a serious issue, just a simple config issue.

@foxsquirrel

I connected the same ethernet (that was connected to the beagleboard V) port to my laptop and executed ip a in wsl. The outcome is given below:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet 10.255.255.254/32 brd 10.255.255.254 scope global lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:d6:49:99 brd ff:ff:ff:ff:ff:ff
inet 172.17.180.16/20 brd 172.17.191.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::215:5dff:fed6:4999/64 scope link
valid_lft forever preferred_lft forever

The outcome of ip a on BBV is given below:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:04:a3:0c:3b:56 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:04:a3:0c:3b:55 brd ff:ff:ff:ff:ff:ff
altname end0
4: ip6tnl0@NONE: mtu 1452 qdisc noop state DOWN group default qlen 1000
link/tunnel6 :: brd :: permaddr 3e25:5f5:3c67::
5: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:04:a3:0c:3b:59 brd ff:ff:ff:ff:ff:ff
inet 192.168.7.2/24 brd 192.168.7.255 scope global usb0
valid_lft forever preferred_lft forever
inet6 fe80::204:a3ff:fe0c:3b59/64 scope link
valid_lft forever preferred_lft forever
6: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:15:95:63:b2 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever

I am not sure what I need to configure to make the board functional as I am new to this environment. Thanks.

$pstree

I don’t have that board to see what is being used for networking. pstree will identify the networking system. Pretty sure all you will need to change will be a line or two in text file. If you wait a while some of the others with that same board will see this post and jump in with the exact fix so we don’t have to hunt around for it.

If ip4 was active you would see the 172.xxxxxx on your bbv.

From your host can you ping 192.168.7.2 or open it in a web browser ? Are you on ethernet or usb cable?

@foxsquirrel

I am glad to let you know that it was a registering issue on our end. As the board was not registered with the organization, the gateway server was blocking it’s acccess. Now after registration, I am able to do the updates and it is working now as it should.
Now come the second part of my query. As the board is up and running, I want to write C programs to execute it in RISCV processors as well as use the FPGA. Can you please let me know the right tools to execute C programs on RISCV and program FPGA as well. If you could provide me with a link that details the steps then that will work as well.
Thanks again for being so responsive and helping me all the way. Thanks.

@lranders

Thanks for the resources. They gcc -v gives me the following output which indicates that the target architecture is RISCV (correct me if I am wrong).

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/riscv64-linux-gnu/12/lto-wrapper
Target: riscv64-linux-gnu
Configured with: …/src/configure -v --with-pkgversion=‘Ubuntu 12.3.0-1ubuntu1~23.04’ --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=riscv64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --disable-multilib --with-arch=rv64gc --with-abi=lp64d --enable-checking=release --build=riscv64-linux-gnu --host=riscv64-linux-gnu --target=riscv64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.3.0 (Ubuntu 12.3.0-1ubuntu1~23.04)

Regarding the FPGA demos, I have seen it earlier but seems to be a bit unclear as the steps needed to be followed to program the FPGA. Can you please indicate which demo I should be following to enable the FPGA programming? As mentioned earlier, I am using windows 11 as the host and it is connected with the board through a serial port. Thanks again and apologize if my queries are oversimplistic. Thank you again.

There server / gateway is not configured properly. If they are using mac authentication it should have also blocked the IP6 address too and not provided an IP6 address. Glad you got it going.

I can’t really make any recommendations as to your direction; they’re all “right”.

I can only tell you what I did: I made a Linux box and followed the directions.
That way I had considerably fewer obstacles than some others,
who shall remain safely anonymous.

Good luck! The road is daunting, but the rewards are great.

Hey @lranders

Thanks for the recommendation. I will try to follow the instructions and will try to engage the FPGA. Thanks.