Pure Arduino on a RoboRio

Is there a way to reflash the RoboRio to behave like an Arduino? We have an old robot for fundraising and are using linux - meaning its either a real arduino or hacking a RoboRio. I am not going to use Wine or get a Windows, and NI software is Windows-only. We will be using c++ no matter what, and Assembly is possible if necessary. Thanks in advance!

no, but the rio is just embedded linux on an fpga. you can run cpp code on it just fine, you really only need a way to upload code to it from linux.

To my knowledge there is no way to Flash the RoboRIO without Windows.

Once you’ve flashed it, programming it can be done entirely on Linux (except maybe configuring motor controllers if you’re using CAN). VSCode, WPILIB, and basically all Vendor Libraries are Crossplatform.

The official DriverStation is Windows Only, but there are open source ones that can be used outside competitions like QDriverStation Conductor.

2 Likes

As for using an Arduino. There is the RobotOpen system that attempts to give as FRC-Like an option as possible using Arduino. You can use an Arduino Uno/Leonardo With a Network Shield, An Arduino Ethernet, or purchase a Gorgon Flex from AndyMark.

They provide libraries for PWM Motor Controllers, DriverStation Joystick Input, Encoders, Solenoids, and other common FRC Bits and Pieces, and use a Google Chrome App IIRC for the DriverStation.

2 Likes

In theory there might be a way to reprogram the FPGA to act like an AtMega328p with the work done here. In practice, you’re better off buying a knockoff Arduino from AliExpress than reflashing a $400 ARM Linux computer and FPGA to act like a $2 microcontroller.

I second the suggestion of QDriverStation if your goal is to drive the robot without a Windows computer. edit: see post below, was mistaken on which project was which

Out of curiosity, why are you avoiding Windows in this instance? While I would definitely prefer not to use it at all as well, your team should have a Windows laptop with the NI driver station installed since that’s the only thing you can use on the field at competitions.

QDriverStation is pretty awful, and I recommend using Conductor instead

3 Likes

Please elaborate on your motivations. Do you just want to replace the FRC FPGA bitfile, or are you trying to achieve an entirely non-NI toolchain? If you want the former, the easiest way is to suck it up and use LabVIEW FPGA to create an lvbitx file, and use the NI FPGA C API to interact with it (if you’re amicable to Rust, check out my project!). If you want the latter, I have no idea where to start. There might be some Xilinx tools you can use to do things with the FPGA more directly. SymbiFlow is also a word I have heard of if you’re going the full libre route, but this is far outside of my realm of understanding.

1 Like

OP - to be clear, the answer is largely “No” - not because of any software constraints, but because the RIO’s internal hardware is orders of magnitude more complex than an Arduino.

I’d tend to say the FRC-provided programming environment is about as simple as you can get for the roboRIO - anything else will ultimately be more work for you to implement.

Any reason not to just use some Arduino?

1 Like

If your motivation is to just avoid Windows, please reconsider. You’re going to make life very hard for yourself when competition starts again. Most of us are at least dual booting or have a Windows VM to access the Driver Station, Imaging Tool, Phoenix Tuner, and so on. There’s no need to be writing assembly either. Don’t let personal ideas get in the way of you and your teammates’ competitive experience.

6 Likes

We do have a windows laptop. Linux is simply better and we all have most of our code experience from Linux laptops. More of avoiding Microsoft than anything…

Why not? The code team needs experience anyways and whats wrong with a bit of extreme trouble? :wink:

99% of our coding is Arduino, we just need to use a RoboRio to pass inspections.

You need more than a Roborio to pass inspection. They inspect and verify the driver station software, and you need to be running a current FRC compatible radio and roborio image to connect to the FMS as well.

2 Likes

What does that even mean? Do you have an Arduino plugged into the CAN bus to command motor controllers or something?

Er, what difference does the development OS make? Regardless of whether you’re targeting atmega or ARM, your laptop is just hosting an IDE and a cross-compiler…

This is not true.

1 Like

This is starting to feel a lot more like a social experiment than an actual technical discussion…

15 Likes

They are right in the sense that the required DS software is and the version of LV that teams are given for programming the robots is restricted to Windows.

On that note, I do feel it’s important to mention that NI does a TON of Linux kernel development and contributes a lot to the RT kernel work. It’s cool stuff. The talks from the NI folks at this past Embedded Linux Conference make for great listening.

1 Like

I mean sure, those things are true, but the assertion the OP made is not. LabVIEW can be both developed and run on Linux (and in fact is run on Linux, on the roboRIO).

1 Like

Just providing data for the social experiment.

6 Likes

That’s a single program. Sort of like saying that VS code runs on Linux when all other microsoft software doesn’t - true, but pointless.

Glad they do Linux development! Surprising that more of their software isn’t Linux and Mac capable