Build VESC Tool on Raspberry Pi

What do you do immediately after firing up the Raspberry Pi 4? Compile the VESC tool of course.

…I’m not entirely sure what I’m going to use this for. :joy:

Build VESC Tool on Raspberry Pi

These steps were tested with:
Raspberry Pi 4
Raspbian 10 (buster - Linux 4.19.80-v7l)
VESC Tool V1.25

IMPORTANT NOTE

This throws errors for missing resources due to spaces in res.qrc. If these icons turn out to be an issue, I’ll post updated steps. Long story short, there are a number of icons (resource files) which use spaces rather than underscores and the only solutions is to cleanup the filenames.

Instructions

Update package info and install updates

sudo apt update
sudo apt upgrade

Install dependencies and fun stuff

sudo apt install software-properties-common git libudev-dev qt-sdk openocd mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libgles2-mesa-dev qtquickcontrols2-5-dev qt5-default qtpositioning5-dev qtconnectivity5-dev qml-module-qt-labs-folderlistmodel qml-module-qtquick-extras qml-module-qtquick-controls2 qt5-default libqt5quickcontrols2-5 qtquickcontrols2-5-dev qtcreator qtcreator-doc libqt5serialport5-dev build-essential qml-module-qt3d qt3d5-dev qtdeclarative5-dev

Fetch the VESC Tool repository

git clone https://github.com/vedderb/vesc_tool

Build the standard VESC Tool

cd vesc_tool
./build_lin_original_only

That’s it! Within less that 20 minutes on the Raspberry Pi 4 (probably less, I didn’t time it :stuck_out_tongue: ) you’ll have an executable file in the folder build/lin.

16 Likes

Data logging?

4 Likes

On-the-go tuning of settings.

4 Likes

Hey I was trying to do this a few weeks ago. I ran into some errors during compilation. Any chance you can provide the commands you used to do this?

3 Likes

I need to consolidate my steps and will post some instructions once I test them on a clean install of Raspbian. Mostly you need some additional QT libraries.

I also ran into an issue where spaces in the icon filenames caused qmake to fail. I renamed the files (added _) rather than fight the issue. I’m sure there is a way around this, but seeing as how 90% of the resources had properly named files with underscores there really shouldn’t be spaces in filenames.

4 Likes

I actually have also got this working. Was a pretty huge pain in the ass, are you building remotely from a second Linux machine? Setting it up that way was pretty painful.

2 Likes

I built directly on a Raspberry Pi 4 from the terminal. The entire process should boil down to a script which I’ll post after another test.

6 Likes

Rock on, yeah that should be easier and faster to setup. How is the build time?

1 Like

I didn’t monitor it (need to check logs) but it was done when I checked back after 30 minutes.

1 Like

Think I spent like a day getting remote building setup… Man I’d have to build it so many times to break even on time there :sweat_smile:. The things we do because we can. I had mine running the mobile version with a little 5" touch display. Pretty fun.

1 Like

Hey I just noticed, this thread is in “In This Corner” which is dedicated to fuck you no you fuck me threads. :slight_smile:

6 Likes

:joy::joy: indeed… thanks for catching that.

3 Likes

Hey so related I think… I did a thing where I build bldc-tool into a docker image, with some x magic cookie nonsense for the gui. The idea being to be able to run an old version of the tool pretty much anywhere (well x86…). All OS and python/qt dependencies being carried in the image.

Wonder if it’s worth doing some CI thing to try to build a docker image for every release…

4 Likes

That would be pretty sweet… build containers of every version so they may be swapped out/deployed easily?

Ah I remember. The reason I went to all that trouble was I bought a used complete with vescs running an older firmware. I wanted to grab the settings before upgrading and redoing the setup, and could not find the binary.

I was thinking, if we build every version and send to docker hub, anyone can run any version pretty much on any linux distro, very easily.

6 Likes

Had recently thought about slapping some ci onto the vesc repo since people were complaining about it being hard to get the binaries for different platforms wonder what thought are with Benjamin on this.

1 Like

Oh right I forgot, they guard the binaries…

Regardless, it isn’t too bad to build even on a RBPi. I am flashing another tonight to verify my steps.

1 Like

Eagerly waiting on it!!!

4 Likes

have you guys fooled with atomic pi? About $40, x86 (atom)?

Might make more sense for this application.

1 Like