Files
Scanning the repository...
| Files | |
|---|---|
| STM32 | |
| python | |
| tests | |
| .clang-format | |
| .clang-tidy | |
| .gitattributes | |
| .gitignore | |
| .pre-commit-config.yaml | |
| .project | |
| LICENSE | |
| README.md | |
| pyproject.toml | |
| uv.lock |
README.mdFIRM
Filtered Inertial Rotation Module
FIRM is a project by the NCSU High Powered Rocketry Club to develop a flight computer for high powered rockets. The flight computer is designed to provide accurate attitude and position data during flight using an array of sensors and advanced filtering algorithms.
It is also designed to be modular and easily adaptable to different rocket configurations and mission requirements. The project will also have a custom PCB design to integrate all the components into a compact and lightweight package suitable for high-speed flight.
Hardware Components
The components used in this project include:
| Part Number | Description | Datasheet Link |
|---|---|---|
| ICM-45686 | 6 Axis IMU | Datasheet |
| STM32F405RGT6 | Microcontroller | Datasheet |
| MMC5983MA | Magnetometer | Datasheet |
| BMP581 | Pressure Sensor | Datasheet |
Project Setup
To set up the project, follow these steps (assuming you have Git/Github Desktop, and uv installed):
- Clone the repository:
git clone https://github.com/NCSU-High-Powered-Rocketry-Club/FIRM.git
Download the STM32CubeCLT from the STMicroelectronics website and install it on your machine.
Install the STM32 VS Code Extension.
Restart VS Code.
Open the STM32 folder of the repo in VS Code and use the extension to import the folder with the "Import CMake project" button.
Configure your workspace by accepting the default settings from the pop-up messages in VS Code.
Click the "Build" button on the bottom status bar to build the project.
Run
uv sync.Run
uv run pre-commit installto set up the git hook for automatic code formatting and linting, usingclang-format&clang-tidy.
Building the project
In VS Code, press Ctrl+Shift+B to bring up the build menu.
Then click "CMake: build". You should see the build output in the terminal.
Flashing the firmware
To flash the firmware onto the STM32 microcontroller, follow these steps:
Connect the ST-Link Debugger to your computer, and jump the GND, SWDIO, and SWCLK pins from the ST-Link onto FIRM (see the back of the PCB for pin locations).
Power FIRM via a USB-C cable or another power source.
In VSCode, hit
Ctrl+Shift+Pto open the command palette. Then search forRun Taskand select it. Then select the option which says to flash via SWD.
Running the debugger
Running the debugger is very similar to flashing the firmware.
Make sure you still have the ST-Link hooked onto FIRM, and then go to the Run and Debug tab on the left side of VS Code (or hit Ctrl+Shift+D).
Then simply click the green play button at the top of the sidebar to start a debugging session.
Third party licenses
Contains FATFS changes from https://github.com/MathewMorrow/STM32-SD-Logging-DMA (MIT Licensed)