waterloo-rocketry / cansw_processor_airbrakes

Processor board was developed for the 2023-2024 design cycle to perform state estimation and control tasks for Borealis's airbrakes system
2 stars 0 forks source link

cansw_processor_stm

Software repo for the processor board

Processor is a bit different from most other rocketCAN boards as it uses an STM32H733 processor. The development environment of choice is STM's own STM32CubeIDE.

To get started with development, clone the repository and open the IDE project folder in the workspace directory of your choice. You will also need to initialize the submodules in the project using

git submodule update --init --recursive

Otherwise this process is fairly standard across Eclipse-based IDEs, so any issues should be resolvable with some Google-fu.

Development Guidelines

RTOS

In addition to targeting a more modern CPU, the project is made significantly more complicated by the use of a real-time operating system (RTOS). Our RTOS of choice is FreeRTOS, a lightweight and very functional choice. What this means for you as a developer is, number one, RTFM. Number two, do not put your application code in main.c. Put one or more source and header files inside of Tasks/, and only import headers, call an initialization function, and add your task to the RTOS scheduler. Some other basic RTOS guidelines

Hardware

Queues

Logging

on-Target Integration Testing System (oTITS)

This module is an attempt at live integration testing. oTITS runs in a FreeRTOS task which periodically executes user-registered test functions and prints the results. Otits is meant to be a developer tool to help flag broken peripherals or tasks. It is somewhat intrusive and may disrupt timings slightly in order to test peripherals.

Quick-start:

Add tests:

Unfortunately there is no convenient way to read the rapidly printing messages aside from stopping/starting and scrolling through the serial terminal.

Misc