The VCU is responsible for controlling the tractive system based on driver input. The microcontroller used in this project is the STM32 F746ZG.
More detailed information about this project is available to members on the SUFST Docs Site.
This project depends on middlewares in the src/Middlewares/
folder, some of
which are Git submodules. When first cloning this repo, run the following
commands:
git submodule init
git submodule update
For more information on submodules, see the Git submodules documentation.
To build this project and flash code to the microcontroller, you will need the following on your path:
- Make
- ARM GNU Embedded Toolchain
- STLink Open Source Toolset
mkdir
,rm
,tput
andecho
Build with:
make -j -s
Flash with:
make flash
For detailed toolchain setup instructions, see the SUFST Docs Site.
Note: Windows users should run these commands from Git Bash.
This project is set up to be edited and debugged in VS Code.
The .vscode
folder includes tasks and launch configurations. To improve
Intellisense, it is recommended to use ccdgen
.
Make sure it is installed with the following command, which may differ depending on your environment:
python3 -m pip install ccdgen
Then, you can generate the compile commands database using the relevant Makefile
target:
make -s ccd
Since the toolchain is set up to be fully command line based, it is also possible to use other code editors.
Note: Windows users should set Git Bash as the shell in VS Code.
STM32CubeMX is used
to generate boilerplate initialisation code for the microcontroller. These
configurations are stored in src/VCU.ioc
which should not be edited manually.
To minimise the chance of merge conflicts, changes to the .ioc
should be made
as infrequently as possible as the .ioc
format is not well suited to version
control.
Note: CubeMX generates a Makefile in the
src
folder. This should not be used, there is a custom Makefile in the project root. If CubeMX adds something to the Makefile it generates which is not in the custom Makefile, it should be copied over. This should only happen infrequently when adding a new peripheral or CubeMX managed middlewares.
Before contributing to this project, make sure to familiarise yourself with the project-specific contributing guidelines.
Microcontroller:
ThreadX RTOS:
CAN / inverter: