This guide describes how to set up a development environment on Ubuntu 16.04 and later for working with the VESC firmware and VESC Tool. Open a terminal and follow along...
Start by updating the system and installing some required packages:
sudo apt update
sudo apt upgrade
sudo apt install build-essential openocd git libudev-dev qt-sdkNow install the gcc-arm-embedded toolchain (see this page for more details)
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppapress Y, enter, then
sudo apt update
sudo apt install gcc-arm-embeddednow add udev rules to use the stlink v2 programmer without beeing root
wget vedder.se/Temp/49-stlinkv2.rules
sudo mv 49-stlinkv2.rules /etc/udev/rules.d/
sudo udevadm triggerAt this point you should be able to clone the firmware from github, build it and upload it. Let's give it a try
git clone https://github.com/vedderb/bldc.git vesc_firmware
cd vesc_firmware
makeby default this will build firmware for hardware version 6. To change the hardware version, open conf_general.h and change it to use the hardware version that you have. For example, for HW 4.12 it should look like this
/*
* Select only one hardware version
*/
#if !defined(HW_VERSION_40) && !defined(HW_VERSION_45) && !defined(HW_VERSION_46) && \
!defined(HW_VERSION_48) && !defined(HW_VERSION_49) && !defined(HW_VERSION_410) && \
!defined(HW_VERSION_60) && !defined(HW_VERSION_R2) && !defined(HW_VERSION_VICTOR_R1A) && \
!defined(HW_VERSION_DAS_RS) && !defined(HW_VERSION_PALTA) && !defined(HW_VERSION_RH) && \
!defined(HW_VERSION_TP)
//#define HW_VERSION_40
//#define HW_VERSION_45
//#define HW_VERSION_46 // Also for 4.7
//#define HW_VERSION_48
//#define HW_VERSION_49
#define HW_VERSION_410 // Also for 4.11 and 4.12
//#define HW_VERSION_60
//#define HW_VERSION_R2
//#define HW_VERSION_VICTOR_R1A
//#define HW_VERSION_DAS_RS
//#define HW_VERSION_PALTA
//#define HW_VERSION_RH
//#define HW_VERSION_TP
#endifthere are also many other options that can be changed in conf_general.h. To rebuild the firmware after the changes, run
makenow connect the stlink v2 programmer, connect power from a lab power supply and try to upload the firmware
make uploadIt should say verified ok towards the end if everything went well.
VESC Tool
In order to build VESC Tool you need a recent version of the Qt SDK. Go to https://www.qt.io/download and get Qt Open Source. You should get a file called something like qt-unified-linux-x64-3.0.2-online.run. Set the executable flag of the file and install it as root to get a system-wide installation
cd Downloads
chmod +x qt-unified-linux-x64-3.0.2-online.run
sudo ./qt-unified-linux-x64-3.0.2-online.runfollow the instructions to finish the installation. You might also need the following packages:
sudo apt install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev
At this point you should be able to clone the source code for VESC Tool and build it.
git clone https://github.com/vedderb/vesc_tool.git vesc_toolIt is recommended to open the project file from Qt Creator (which you should have after the previous step) and build the project from there. Instructions for building the android version will be added later.
Comments
Ramp Xtreme
This is an excellent, detailed guide for anyone looking to step beyond the VESC Tool GUI and customize the firmware. The instructions for setting up the `gcc-arm-embedded` toolchain and handling different hardware versions (like 4.12) are crucial. I imagine this level of customization would be essential for pushing the limits of high-performance applications, maybe even optimizing the controllers used in something powerful like the *Ramp Xtreme*.
Meteor Mayhem in Your Hands: Dominate the Solar Smash Arena
Great guide on setting up the development environment! For those looking to take a break after coding, I recommend checking out Solar Smash. It’s a fun way to squeeze in some creativity after a focused session. If you’re curious about it, you can visit Solar Smash for more details. Happy coding!
This sounds like a really fun
This sounds like a really fun and exciting event for the Sacramento community! If you love creative block-based games and puzzles, you should definitely check out block blast. It’s a great way to bring healthy competition and creativity to a gaming gathering. I hope to see you all there!
This approach is very logical
This approach is very logical and has a clear investment strategy, standardizing Ubuntu 16.04 LTS as a foundation is a smart move to optimize the VESC Tool code production pipeline later. The process of updating the system and installing required packages is the first Friday Night Funkin' of the system, each flow and beat must be standardized to ensure liquidity for the dev environment. Just maintain this technical vision, ensure quality from the preparation step, and you will have a firm grasp of the maximum performance profit margin for the entire project, no need to worry much.
Pages