Skip to content

Avionics Software for the University of Calgary’s Student Organization for Aerospace Research

Notifications You must be signed in to change notification settings

StudentOrganisationForAerospaceResearch/AvionicsSoftware

Repository files navigation

Avionics

Foo STMicro FreeRTOS Git

Table of Contents

  1. About This
    1. IDE support
    2. Timeline
    3. Links
  2. Languages
  3. Motivation
  4. MVP Requirements
  5. Design Decisions
    1. Diagrams
      1. Sensor Poll
      2. UART poll
      3. Class Diagram
      4. Module & Folder Structure
  6. Formatting Guidelines
  7. Milestones
  8. Processes
  9. Folder Structure

About This

This is the code repository for staging the Student Organisation for Aerospace Research (SOAR's) C++ rewrite.

The original code in this repository was written in C, The old repository can be found here.

IDE support

By default we are using the STMCubeIDE.

Use the _IDE folder to add support for your IDE of choice if needed.
Make sure to update the .gitignore.

Timeline

  • Layout desired requirements
  • Design and document architecture
    • Diagram
    • Reference other teams (if possible)
  • Scope MVP
    • Before September 6th (Classes begin)
  • Build MVP
    • PREREQ: Merge A3.3, Clang Format
    • Integration test on hardware
    • Full SW team approval
  • Create tasks and documentation to update each code section
  • Create on-boarding presentation
    • What it is
    • How it works
    • Why decisions were made
  • Merge MVP into master
  1. Design Freeze
    • End of August
  2. Design Review
    • July 30th
  3. Testing Schedule
    • Build MVP
  4. Presentation
    • Mid September
  5. Competition Data
    • June 2023

Links

  1. Brainstorming Document
  2. Formal Document

The most relevant information from both documents is distributed in this repo.

Languages

Embedded software is written primarily in C/C++, using CMSIS with FreeRTOS as the underlying operating system.
Scripts and Tools are written in various languages, primarily Python.
Diagrams are designed with a variety of software, code based diagrams are written in PlantUML, other diagrams are designed in Diagrams.net

Motivation

  • Readable
  • Robust
  • Modular
  • Consistent
  • Easier for new members
  • Documented from the start
  • Test Driven Design

MVP Requirements

  • Compile flags/#ifdef flag for solid vs hybrid.
  • Base Task Communication
  • UART poll and debug logging
  • Sensor log output over UART5
  • Queue
  • Abstractions for important systems
    • Class Diagrams
  • Module
  • Well documented
  • Testing Framework

Design Decisions

  • Tasks are contained and communicate using queues.
    • Possibly look into a priority queue to handle queues getting too full.
  • Abstract Base Classes for things like Sensor or Task.
  • Pointer hierarchy
    1. References
    2. Smart Pointers
      • Beware RTOS support
    3. Pointers
  • Reduce cognitive overhead by documenting your thought process for complicated tasks.
    • Especially in non-trivial ifs or big loops.

Diagrams

Sensor Poll

UART Poll

Class Diagram

Module and Folder Structure

Formatting Guidelines

  • Functions are lowercase.
    • Class related functions are uppercase.
  • Infinite Loops are written with while(1) as oppose to for(;;).

Milestones

  • Architecture Design Complete
  • MVP Complete
  • Rest of Codebase complete

Processes

Changing .ioc file

  • This should be improved in the future using a rename script, or by modifying CMake file if necessary. There may be a setting in CubeIDE
  • Whenever you change the .ioc file the following must be done
  1. Rename Core/main.cpp to Core/main.c
  2. Generate code from .ioc change
  3. Rename back to Core/main.cpp

Folder Structure

  • The Core directory contains code primarily generated by STM32CubeIDE, or for other Middlewares such as FreeRTOS.
  • Most of the written code should go into Components under the most appropriate sub-directory.

About

Avionics Software for the University of Calgary’s Student Organization for Aerospace Research

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages