You are here

Setting up a development environment on Ubuntu 16.04 and later LTS releases

Submitted by benjamin on Wed, 2018-01-24 10:16

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-sdk

Now install the gcc-arm-embedded toolchain (see this page for more details)

sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa

press Y, enter, then

sudo apt update
sudo apt install gcc-arm-embedded

now 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 trigger

At 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
make

by 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
#endif

there are also many other options that can be changed in conf_general.h. To rebuild the firmware after the changes, run

make

now connect the stlink v2 programmer, connect power from a lab power supply and try to upload the firmware

make upload

It 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.run

follow 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_tool

It 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

Morne-hurez's picture

Setting up your development environment for android game development is essential for smooth progress. Utilize user-friendly tools like Android Studio and Unity to simplify your workflow. By configuring these platforms properly, you'll ensure seamless coding, testing, and optimization, paving the way for successful game creation.

This guide shows how to set up a Django development environment on Ubuntu 16.04 and subsequent LTS editions. It involves installing Python 3, pip 3, Django, and virtualenv to offer you all the tools you need to create web applications with Django. basketball stars

As a student aspiring to become a game developer, I focus on honing my skills through practice and learning. While seeking assistance, I've found that relying on the best assignment writing service ensures high-quality support tailored to my needs. This allows me to excel in both my coursework and my passion for game development.

Hey folks! Setting up your dev environment on Ubuntu 16.04 or later? Easy peasy! Just update your system, install necessary packages like build-essential, openocd, git, libudev-dev, and qt-sdk. Don't forget gcc-arm-embedded toolchain - add the repo, update, and install. Lastly, grab those udev rules for STLink V2. Voila! All set! Check out more tips like this on SavvyTipsGuru, perfect for business and course and jobs. Happy coding!

Hey there, community!

Are you on the lookout for skilled WooCommerce developers for hire to level up your e-commerce game? Look no further! Whether you're starting a new online store or revamping an existing one, finding the right developers is key to success.

If you need talented WooCommerce experts, you're in luck. This forum is teeming with seasoned professionals ready to tackle your projects with precision and finesse. Share your requirements, discuss your vision, and let's connect you with the perfect developers to bring your e-commerce dreams to life.

Don't hesitate to reach out and start the conversation! 🛒💻

The Custom Airline Software Development Guide by Attract Group is a comprehensive resource for aviation companies looking to elevate their operations. It delves expertly into the nuances of developing tailored software solutions, ensuring airlines can optimize processes, enhance customer experience, and stay competitive in a dynamic industry. Highly informative for stakeholders!

I really like the word game waffle. Not the same as the daily one. You can play the "unlimited" version of Waffle until you get tired of it. The figures in the box tell you what to do. Move the characters around so that all of the rows, both vertical and horizontal, line up with each other to make words. You can move 15 times. The game will end after 15 tries if it can't move the characters to the right place.
 

Pages