Embedded code for the ESCs, solenoids, bricks, and more using CAN communication.
This code is developed with STM32CubeIDE for the STM32F042K6T6. See the F0 reference manual too.
Driver code is not tracked by git. To get it, open the IOC file for the project and go to Project > Generate Code. This will produce the appropriate Driver/ folders for the code.
See the References folder for information on usual setups and the common folder for information on setting up the shared implementations and the shared source files themselves. The Python folder has code for testing and a guide for doing so.
Set optimization for Release builds to -03 rather than -Osize (the default). This setting is in Project > Properties > C/C++ Build > Settings > Tool Settings > MCU GCC Compiler > Optimization. This should only be done for Release builds. Debug builds should not be optimization
In Window > Preferences > C/C++ > Editor > Save Actions
- Check "Remove trailing whitespace"
- Select the "In all lines"
- Check "Ensure newline at the end of file"
This makes it easier to diff files in git and prevent unnecessary changes.