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

Downloading Qt is harder than you would think as by default it isn't downloaded when following the download instructions. The installer has a page with checkbuttons to pick what to download. You have to go down within the Qt box (Not the previews one) which looks like it has already been selected, and then somewhere in there select Qt 5.10...

That may have slowed me down a bit this morning...

Nursingexpert's picture

We are aware of the significance of grades and marks throughout your academic career. As a result, we take great care to produce an Nursing Essay Writing Services of the highest caliber for you. Your essay's content will be developed by our experts in a way that satisfies all of your professor's requirements, ensuring that you submit work that will be well-received.

Looking for expert assistance with your academic papers? Look no further than write my paper www.essayshark.com ! Our dedicated team of experienced writers is ready to tackle any assignment, from essays to research papers and everything in between. With a focus on quality, originality, and meeting deadlines, we guarantee that your paper will be tailored to your specifications and delivered on time. Plus, our affordable rates make professional writing help accessible to students of all budgets. Say goodbye to late-night stress and hello to top grades with. Trust us to help you succeed in your academic journey!

Recently, I've been venturing into some enjoyable games to escape the monotony of the everyday life, and it's been a welcome diversion. But when I take mental breaks from gaming, I can't help but think of interesting Dissertation Topics For Economics. The way these two seemingly unconnected worlds converge to offer a singular viewpoint on leisure and intellectual pursuits is fascinating.

Geometry Dash tasks players with guiding a geometric icon through a series of levels, avoiding spikes, gaps, and other hazards along the way.

One more step should be added concerning the kit build and run kit.

By default I had another version that didn't work.

For beginners, it can be confusing.

Ubuntu 18-04

I have compiled with qt 5.11.1 and 5.10.1 but i got some error with non existing GL.h

Following packages will fix this error.

sudo apt-get install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev

 

 

Good mornig,

I'm trying to compile the latest version of vesc firmware. I've an old 4.12 version. After changing the hardware version and uploading the firmware nothing work, vesc is not recognized by vesc-tool. I've seen that there are substantial modification also in conf_general.h, like there no exist more #define HW_VERSION but instead HW_SOURCE and HW_HEADER, so: there are other modification in conf_general that i must make in order to properly config my vesc?

Thank you
Elia

I have spent hours trying to figure out how to compile the vesc-tool for my android. It keeps giving me an error saying that it cant find the serialbus module when opening the .pro file. A google search came up with one answer that didnt work. I am running Qt 5.10.1. I also tried 5.12 and 5.13. neither worked. If anyone knows how to fix this, (or even a VM of everything) any help would be appreciated.

Thanks,

Andrew Cline

Andrew Cline

after make and upload showing error

openocd -f board/stm32f4discovery.cfg -c "reset_config trst_only combined" -c "program build/BLDC_4_ChibiOS.elf verify reset exit" # For openocd 0.9

/bin/sh: 1: openocd: not found

Makefile:289: recipe for target 'upload' failed

make: *** [upload] Error 127

It has been discovered that not all versions of gcc produce working binaries. (https://github.com/vedderb/bldc/issues/210)

the latest version of gcc that works on ubuntu 20.04 and builds working binaries can be found here: https://developer.arm.com/tools-and-software/open-source-software/develo...

 

For compiling vesc tool it now seems like following the instructions in the build_lin and build_win scripts is the way to go. some dependencies need to be swapped out depending on ubuntu version though.

 

 

Hello,

this seems to have changed to a new architecture. can someone explain the new process ?

conf_general.h doesn't contain all hw_***.h anymore

Assignmentspro's picture

Our Assignment Writing Service will create a 100% custom written assignment that will help you to be the best. We work with a Professional Assignment Writers team of UK based writers who, following your requirements and instructions, will develop a model answer which is flawlessly structured, well-sourced and written in perfect English.

What you provided was exactly what I needed. I've looked everywhere, but no one has anything fresh to give. I've subscribed to your feed and eagerly await your next update. If you have time, please come join us in run 3 or among us

For sure, the total aspect of the game is struck for the candidates. The joy of the Tools Dorset is invited for the range. Its branch is filed for the offers. Value is germinated for the top of the cycled items for the ranked element for the sequencing by all chunks.

as

 

This is a great post. I like this topic. This site has lots of advantages. I found many interesting things on this site. It helps me in many ways. Thanks for posting this again stumble guys

Your blog provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing. Keep blogging, Waffle unlimited

I'm excited to explore more about the story and how

That's Not My Neighbor game explores horror in a cold 1950s office setting.

CureCloudMD's picture

 

Want to hire the best rehab billing services company in the USA? Get started with CureCloudMD which provides cost-effective, reliable, and HIPAA-compliant medical billing services across more than 30 specialties in the healthcare field. We provide a complete range of administrative services including medical credentialing, provider enrollment, revenue cycle management, medical billing and coding, account receivable recovery services, and customer support solutions. 

 The advantages of playing word search go beyond than you might originally think, from preventing dementia to assisting with language learning.

We provide premium full grain leather since it adds to the durability and long life of the garment and is only possible with the best materials and craftsmanship. Consequently, you can choose from a variety of superb leather jackets made of calfskin, goatskin, cowhide, sheepskin and lambskin. Our Website The Designer Jackets is an outstanding selection of leather bombers and biker jackets,

Visit Here:

women bomber jacket

Engaging in transformative leadership coaching https://chaselearning.org/ on this platform has been a defining experience for me as a student. It goes beyond traditional education, molding managers into visionary leaders. The emphasis on practical skills, strategic thinking, and a holistic leadership approach has broadened my perspective. It's not just about managing; it's about inspiring and leading with a vision. As a student, this journey has equipped me with the tools to navigate the dynamic landscape of leadership and make a meaningful impact.

Thanks a lot for information, was searching for similar one. 

English essay writing can be challenging, but with get essay help, I can now tackle my assignments with confidence. Their essay writers are experts in English, offering me prompt and professional assistance. Their essay writing tutor has helped me improve my writing skills and excel in my English essays.

Here is a tutorial on how to set up a Django development environment on Ubuntu 16.04 and later LTS releases. It includes installing Python 3, pip 3, Django and virtualenv in order to provide you with the tools necessary for developing web applications with Django Flappy Bird

Learn how to install a Django development environment on Ubuntu 16.04 and later Long Term Support (LTS) releases with this guide. You'll have everything you need to create Django-based web apps, including Python 3, pip 3, Django, and virtualenv. basketball stars

Engaging a professional assignment writing service ensures a high standard of work, providing students with expertly crafted assignments that meet academic requirements and contribute to overall learning.

Whether you are a new gamer or a fan from the beginning, Super Mario will never disappoint you. Get ready to embark on this exciting adventure and become the hero we've all been waiting for!
 

Students have been facing difficultuies to submit their dissertation at university,Iam always available for this type of students.We offer an online the best 

dissertation service to help the students.

The article on https://profitworks.ca/blog/1048-8-digital-marketing-trends-2024-that-will-affect-your-seo.html about 2024 digital marketing trends is a gem for marketers seeking a strategic edge. The predictions are comprehensive, and the focus on SEO implications is a key takeaway, guiding me to refine my approach for sustained success in the dynamic digital space.

 

All of the information you put in your post is good and can be very helpful. I'll remember it. Thanks for sharing the information. Please keep posting new information age of war game
 

buy best academic writing services

Rich Text Editor, edit-comment-body-und-0-value
Rich Text Editor, edit-comment-body-und-0-valueedit-comment-body-und-0-value

it can be overwhelming to navigate through the sea of options available online. To make things easier for you, we've compiled a list of the top websites that offer high-quality assignment writing service 

Pages