Code Monkey home page Code Monkey logo

bldc's Introduction

VESC firmware

License: GPL v3 Travis CI Status Codacy Badge Contributors Watchers Stars Forks

An open source motor controller firmware.

This is the source code for the VESC DC/BLDC/FOC controller. Read more at https://vesc-project.com/

Supported boards

All of them!

Check the supported boards by typing make

[Firmware]
     fw   - Build firmware for default target
                            supported boards are: 100_250 100_250_no_limits 100_500...

There are also many other options that can be changed in conf_general.h.

Prerequisites

On Ubuntu (Linux)/macOS

  • Tools: git, wget, and make
  • Additional Linux requirements: libgl-dev and libxcb-xinerama0
  • Helpful Ubuntu commands:
sudo apt install git build-essential libgl-dev libxcb-xinerama0 wget git-gui
  • Helpful macOS tools:
brew install stlink
brew install openocd

On Windows

Install Dev environment and build

On Ubuntu (Linux)/MacOS

Open up a terminal

  1. git clone http://github.com/vedderb/bldc.git
  2. cd bldc
  3. Continue with On all platforms

On Windows

  1. Open up a Windows Powershell terminal (Resist the urge to run Powershell as administrator, that will break things)
  2. Type choco install make
  3. git clone http://github.com/vedderb/bldc
  4. cd bldc
  5. Continue with On all platforms

On all platforms

  1. git checkout origin/master
  2. make arm_sdk_install
  3. make <-- Pick out the name of your target device from the supported boards list. For instance, I have a Trampa VESC 100/250, so my target is 100_250
  4. make 100_250 <-- This will build the VESC 100/250 firmware and place it into the bldc/builds/100_250/ directory

Other tools

Linux Optional - Add udev rules to use the stlink v2 programmer without being root

wget vedder.se/Temp/49-stlinkv2.rules
sudo mv 49-stlinkv2.rules /etc/udev/rules.d/
sudo udevadm trigger

IDE

Prerequisites

On macOS/Linux

  • python3, and pip

On Windows

All platforms

  1. pip install aqtinstall
  2. make qt_install

Upload to VESC

Method 1 - Flash it using an STLink SWD debugger

  1. Build and flash the bootloader first
  2. Then _flash to the target of your choice. So for instance, for the VESC 100/250:
make 100_250_flash

Method 2 - Upload Firmware via VESC tool through USB

  1. Clone and build the firmware in .bin format as in the above Build instructions

In VESC tool

  1. Connect to the VESC
  2. Navigate to the Firmware tab on the left side menu
  3. Click on Custom file tab
  4. Click on the folder icon to select the built firmware in .bin format (e.g. build/100_250/100_250.bin)
[ Reminder : It is normal to see VESC disconnects during the firmware upload process ]
[ Warning : DO NOT DISCONNECT POWER/USB to VESC during the upload process, or you will risk bricking your VESC ]
[ Warning : ONLY DISCONNECT your VESC 10s after the upload loading bar completed and "FW Upload DONE" ]
  1. Press the upload firmware button (downward arrow) on the bottom right to start upload the selected firmware.
  2. Wait for 10s after the loading bar completed (Warning: unplug sooner will risk bricking your VESC)
  3. The VESC will disconnect itself after new firmware is uploaded.

In case you bricked your VESC

you will need to upload a new working firmware to the VESC.
However, to upload a firmware to a bricked VESC, you have to use a SWD Debugger.

Contribute

Head to the forums to get involved and improve this project. Join the Discord for real-time support and chat

License

The software is released under the GNU General Public License version 3.0

bldc's People

Contributors

vedderb avatar mitchlol avatar nitrousnrg avatar kubark42 avatar jfriesen222 avatar shackmeister avatar maxicor88 avatar surfdado avatar ddosoff avatar flytrex-vadim avatar peemouse avatar tipsmiller avatar secupol avatar mattbutlar avatar dnordahl83 avatar rewolff avatar daddye avatar elwinboots avatar trosenband avatar rpasichnyk avatar jaycobe96 avatar derlucas avatar jxltom avatar techaumnu avatar teslafly avatar joshdellay avatar supercrazysam avatar mherb avatar esbenfr avatar davorinmista avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.