mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-20 14:38:18 +08:00
123185dfac31d23866baab8326be28de86fe9a18
…
Compiling the firmware
Installing prerequisites
To compile the program, you first need to install the prerequisite tools:
gcc-arm-none-eabi: GCC compilation toolchain for ARM microcontrollers.- Installing on Ubuntu:
sudo apt-get install gcc-arm-none-eabi
- Installing on Ubuntu:
stm32cubeMX: Tool from STM to automatically generate setup routines and configure libraries, etc.- Available here
Generate code
- Run stm32cubeMX and load the
stm32cubemx/Odrive.iocproject file. - Press
Project -> Generate code - You may need to let it download some drivers and such.
Generate makefile
There is an excellent project called CubeMX2Makefile, originally from baoshi. This project is included as a submodule.
- Initalise and clone the submodules:
git submodule init; git submodule update - Generate makefile:
CubeMX2Makefile/CubeMX2Makefile.py stm32cubemx/ - Try to build the stuff!
cd stm32cubemx
make
Languages
C++
32.6%
C
29.8%
Python
19.2%
JavaScript
10.8%
Vue
4%
Other
3.6%