This repository hosts the software platform that all of our robots will be running for the 2020-2021 season. How to specialize the code for each robot will be decided later.
Our intent is to use a state machine based design method, with a CAN polling task, UART polling task, and a task for each subsystem. Still very much a work in progress.
- Standard
- Hero
- Engineer
- Sentry
- Aerial
- Clone the repository.
- Edit CubeMX file as needed.
- Doublecheck the "Toolchain Folder Location" (Project output location) in CubeMX's Project Manager settings is the same directory as the current CubeMX file. If it isn't, File->Save Project As to the same directory, and overwrite the file. "Toolchain Folder Location" should update itself.
- Click "Generate Code" within CubeMX, and the existing code should be regenerated WITH user code untouched.
- Navigate to
\Middlewares\Third_Party\FreeRTOS\Source
and replacetasks.c
with THIS updated version of the file. Size of the new file should be 172KB compared to the old 171KB. - Within the Keil Microvision project, under the "Project" tab on the left, right click
Middlewares/FreeRTOS
and clickOptions for Group 'Middlewares/FreeRTOS'
. Navigate to theC/C++
tab and add the flag--c99
to the sectionMisc Controls
. This is to force the compiler to compile FreeRTOS with C99, as the rest of the project is to be compiled as C++, and FreeRTOS doesn't like that. - Rebuild all files, and you should be ready to go.
- C++ support
- UART/CAN Transmit + Receive
- RC Support
- PWM over GPIO
- Closed loop motor control via PID
- Code comments in English
- Debug by sending motor feedback to Arduino over UART (arduino code here).
- That's kinda it
To add features, create a pull request and we'll go from there.