- Abstract
- File Structure
- Thread Architecture
- Requirements
- Importing the project in STM32CubeIDE
- Building the Software
- Flashing the Hostboards
- Miscellaneous
The EPFL Rocket Team association will be participating in the 10β000 feet SRAD Hybrid Engine category of the 2021 Virtual Spaceport America Cup, which will be held in June 2021. For more information, visit https://epflrocketteam.ch/ π
This repository contains the software of the Ground Segment subsystem dedicated to the Ground Support Equipment, or GSE.
The main goal of this software is to run the operations in the Launch Area. Which, for safety reasons, are all done remotely from the Ground Station.
To acheieve this, this software comports different features, mainly dedicated to the control of actuators, the aquisition of sensors, safety features, as well as the critical management of the radio communication with other subsystems.
This piece of software is meant to be run on EPFL Rocket Teams "Hostboards", our custom PCBs housing a STM32F446RET6 microcontroller. And for a completely functional setup, 3 Hostboards need to be used, all of them connected to each other through a CAN bus.
This software is being developped in C on STM32CubeIDE, using FreeRTOS, the CMSIS abstraction layer, and with heavy inpiration from the 2020 AV Code located at: https://github.com/EPFLRocketTeam/BellaLui for many of the core functionnality.
As for the Radio communication, this is established using Xbee RF modems available on external custom PCBs from the team (868 MHz in EU/CH and 915 MHz in the USA).
BellaLuiGSE
β README.md
ββββApplication
β ββββSrc User-defined source files
β β ββββdebug Contains all the debugging source files
β β ββββGSE Contains all GSE Specific source files
β β ββββtelemetry Contains all the Telemetry related source files
β β can_reception.c All functions related to receiving messages on the CAN bus
β β can_transmission.c All functions related to transmitting messages on the CAN bus
β β sync.c Synchronisation logic used by some debugging functions
β β thread_init.c Thread initialisations
β |
β ββββInc User-defined header files
β β ββββdebug Contains all the debugging header files
β β ββββGSE Contains all GSE Specific header files
β β ββββmisc Contains common enum/structure definitions
β β ββββtelemetry Contains all the Telemetry related header files
β β can_reception.h All defintions related to receiving messages on the CAN bus
β β can_transmission.h All definitions to transmitting messages on the CAN bus
β β sync.h Synchronisation logic used by some debugging functions
β β thread_init.h Thread initialisations, choice of Hostboard code to flash
β
ββββCore Core functionnality
β ββββSrc Core source files
β β main.c Main file, program starting point
β β other system source files
β |
β ββββInc Core header files
β β main.h Main file header
| | FreeRTOSConfig.h FreeRTOS main config file
β β other system header files
β
ββββDrivers
β ββββCMSIS CMSIS HAL Core
β ββββSTM32F4xx_HAL_Driver CMSIS HAL Drivers
β
ββββMiddlewares
β ββββThird_Party Contains all Thrid Party software used
β β ββββFreeRTOS FreeRTOS source code
|
| BellaLuiGSE.ioc STM32CubeIDE main configuration file
| other auto-generated files
This software is heavily using the multi-threading functionnality of FreeRTOS, several threads have thus been implemented to manage all required functionnalities of the GSE.
And as mentionned also above, a complete setup using this software requires 3 Hostboards to be complete.
Each of these need to be flashed by a different version of the software, all of them containing different running threads when running.
This thread definitions are pre-configured in the threads_init.h file, the main Hostboard define only needs to be properly selected to select the part of the code for each Hostboard.
- STM32CubeIDE: Available for free here on Windows, MacOS and Linux.
- git: Either command-line or GUI versions will do. Instructions to get the command line version are availble here.
- [OPTIONAL] A git GUI Client : I would recommend Gitkraken, but SublimeMerge, Github Desktop or any other will do, this is a matter of personal preference.
- [1-3] EPFL Rocket Team Hostboard (the code can be developped on 1 Hostboard, but 3 are needed for the complete assembly)
The software first needs to be imported into STM32CubeIDE.
First to get the software, open a terminal, navigate to the folder where you want to download the softwre, and type:
git clone https://github.com/EPFLRocketTeam/BellaLuiGSE.git
Then open STM32CubeIDE, press File->"Open Projects from File System..."
Press Directory to find the folder where you downloaded the software, then press Select Folder.
Press Finish.
Congratulations! The software has been imported. You can now navigate through the file system and are ready to build!
As for the development, STM32CubeIDE is also used to build the software.
To build the software, press Ctrl-B, Project->"Build All", or the Hammer Icon in the toolbar.
A debug sub-folder will then be created in the folder where the software is located, containing all the temporary files as well as the final compiled files to be flashed, the one of interest here being the .elf file.
To flash the board either way, the same hardware setup is used, and it is as follows:
- Remove JP1, the jumper at the top of the Nucleo board, to the right of the USB connector.
- Connect the 2 PCBs as seen below.
- Plug the Nucleo board to your Computer via USB.
There are 2 ways of flashing the Hostboards, each used for different applications.\
- Run: This is used to flash the Hostboard with the software for it to run on its own, without the debugger.
- When this method is used, the software will restart automatically when the Hostboard is powered.
- To Run the software on the Hostboard, press Run->Run, or the Green Play Icon in the toolbar.
- Debug: This is used, as the name implies, to debug the software.
- The program does not stay on the MCU when the debugger is disconnected, and will not start again when the Hostboard is powered on.
- To debug the software on the Hostboard, press Run->Debug, or the Bug Icon in the toolbar.