SAE Teensy ECU
IIT SAE Microcontroller programming
|
This repository contains the source code that the SAE team at IIT uses for their microcontrollers.
For new members that are just joining, please refer to the CONTRIBUTING file.
This project assumes you installed the latest version of the following.
add CMake to path
option when installingClone TeensyToolchain alongside this folder.
If it is not named already, rename the cloned/downloaded folder to TeensyToolchain
e.g. TeensyToolchain-master
-> TeensyToolchain
Alternatively, you can modify the TOOLCHAIN_OFFSET
option inside .vscode/settings.json
in order to tell the project where the toolchain is. This path is relative to this folder.
Main logic is either in src/ECUStates.cpp
or src/Front.cpp
Put any libraries / modules in the libraries
folder
VS setup
: Configure things such as what COM
ports to use; both for front and back teensy, whether to use the plotter app, and whether to compile for teensy 3.6
, 4.0
, or 4.1
.Clean
: Clean up build filesReset
: Clean up entire CMake project and reconfigure CMakeBuild
: Compile project and generate binariesUpload
: Upload compiled binary to either front or back teensyMonitor
: Monitor teensy over a CLI, select the appropriate options when running, defaults to Mapped
modeBy default, Ctrl + Shift + B
(Run Build Task) should run Build
then Upload
for both Teensies and then Monitor
.
Alternatively, install the Tasks extension so that the main tasks appear on the status bar.
There are more tasks but these are the most important ones.
You can modify the set values and compile flags inside CmakeLists.txt
if you know what you are doing.
They are mostly under the function calls add_compile_definitions
and add_compile_options
towards the beginning.
This project uses Doxygen to auto generate documentation.
Doxygen Extensions exist for VSCode, to easily compile and view inside VSCode.
The documentation can be generated locally or you can view the auto generated Github Page for this repo.