bldc/README.md

91 lines
2.6 KiB
Markdown
Raw Normal View History

# VESC firmware
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
2019-02-19 14:14:54 -08:00
[![Travis CI Status](https://travis-ci.com/vedderb/bldc.svg?branch=master)](https://travis-ci.com/vedderb/bldc)
2019-02-19 12:35:03 -08:00
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/75e90ffbd46841a3a7be2a9f7a94c242)](https://www.codacy.com/app/vedderb/bldc?utm_source=github.com&utm_medium=referral&utm_content=vedderb/bldc&utm_campaign=Badge_Grade)
[![Contributors](https://img.shields.io/github/contributors/vedderb/bldc.svg)](https://github.com/vedderb/bldc/graphs/contributors)
[![Watchers](https://img.shields.io/github/watchers/vedderb/bldc.svg)](https://github.com/vedderb/bldc/watchers)
[![Stars](https://img.shields.io/github/stars/vedderb/bldc.svg)](https://github.com/vedderb/bldc/stargazers)
[![Forks](https://img.shields.io/github/forks/vedderb/bldc.svg)](https://github.com/vedderb/bldc/network/members)
An open source motor controller firmware.
2017-09-04 12:30:37 -07:00
This is the source code for the VESC DC/BLDC/FOC controller. Read more at
2019-02-19 09:55:18 -08:00
[https://vesc-project.com/](https://vesc-project.com/)
## Supported boards
All of them!
Make sure you select your board in [conf_general.h](conf_general.h)
```c
//#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
//#define HW_VERSION_75_300
//#define HW_VERSION_MINI4
//#define HW_VERSION_DAS_MINI
```
There are also many other options that can be changed in conf_general.h
## Prerequisites
On an Ubuntu machine, install the gcc-arm-embedded toolchain
```bash
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt update
sudo apt install gcc-arm-embedded
```
Add udev rules to use the stlink v2 programmer without being root
```bash
wget vedder.se/Temp/49-stlinkv2.rules
sudo mv 49-stlinkv2.rules /etc/udev/rules.d/
sudo udevadm trigger
```
Build and flash the [bootloader](https://github.com/vedderb/bldc-bootloader)
## Build
Clone and build the firmware
```bash
git clone https://github.com/vedderb/bldc.git vesc_firmware
cd vesc_firmware
make
```
Flash it using an STLink SWD debugger
```bash
make upload
```
## Contribute
Head to the [forums](https://vesc-project.com/forum) to get involved and improve this project.
## License
The software is released under the GNU General Public License version 3.0