Battery Management System of the main board that handles all the cellboards in a Master-Slave configuration of the High Voltage battery pack.
Build dependencies:
- Git (used to clone this project, recommended)
- Make
- Arm toolchain
Flash and debug dependencies:
Note
For GNU/Linux distributions might be needed to perform some additional steps to flash or debug this project, for additional info follow this short guide: Installing st-link to flash STM32 targets on Linux
This project is generated with the CubeMX Initialization Code Generator hence most of the folder structure follows the same as other projects.
Inside the root folder of the project a bunch of useful files can be found:
- The
hv-bms-mainboard-sw.ioc
file contains the generated configuration for the microcontroller (used by CubeMX) openocd.cfg
contains the configuration used to flash or debug the program- The
Makefile
can be used for compilation, flash or debugging
Inside the scripts folder some executable files (generally shell scripts) can be used to automate processes, for example the generation of the FSM or the errors code.
The files not containing source code but that are still used by the project can be found inside the assets folder.
The Driver directory is generated by CubeMx and contains the specific drivers for the microcontroller.
The Core contains three directories:
Src
: where the source code is locatedInc
: where the header files are locatedLib
: where all the dependencies of the project are located (i.e. canlib, micro-libs, ecc...)
Inside the Src and Inc folder, the files inside the bms
folder is treated as
machine independent code and it should be possible to port it to other platforms
with ease.
Warning
Just copy-pasting the code to another platform project is not sufficient for it to work, there a few functions that has to be implemented, for example the ones used to communicate via the peripherals (CAN bus, SPI, ecc...)
Check if all the dependencies are installed and clone this repository with:
git clone --recurse-submodules git@github.com:eagletrt/hv-bms-mainboard-sw.git
Tip
When cloning with GIT SSH is recommended, but it first need to be configured correctly.
To do this look for any guide on the internet, you should be able to do that right? (sorry (;_;))
Once you cloned the project go into the root folder and run make
to build it.
If everything works and the program is built correctly you can flash the project
with the make flash
command.