Board Support Packages
warning
🚧 This document is still being actively worked on and is subject to change. 🚧
| Responsible |
|
| Last Updated | 10/12/2025, 12:48:54 PM |
| Last Author | Kai Berszin |
The board support packages are organized in the directory bsp/<bsp-name>/.
Each board upport package provides:
device_tree.h, which lists common defines for devices- CMakeLists.txt, which includes the bsp specific Makefile generated from CubeMx
- the directories
Driversas well asCorewhich contain the generated code from CubeMX.
A Board Support Package is selected either through a preset in the root json file
or via specifying the name of the board support package as the OBC_TARGET_PLATFORM.
Supported Boards​
Creating a BSP from a .ioc file​
- Create a new subdirectory in
bsp/wich the name of the new board. - move the ioc file into that directory.
- CubeMX settings:
3.1 NVIC settings for freertos:
- TODO 3.2 Tools Tab
- Generate as pair of .c/.h files
- Only copy necessary library files
- delete unused library files
- CMakeProject
- Generate Code
- run
tools/fix_cubemx_files.pyin thesage-obc-swdirectory. it changes the references toCURRENT_SOURCE_DIRin the generated CMakeFiles.txt to use the BSP directory variable instead. - create the bsp level CMakeLists.txt which only includes
bsp/<name>/cmake/stm32cubemx.
Toolchain​
The toolchain file is unified between all board support packages inside of bsp/shared/toolchain.cmake.
Discussion Points​
- Should the
device_tree.hfile exists? It is useful for multiple different configurations, but once we are only working on the latest OBC revision and are solidifying the codebase maybe every driver with device access should probably privately declare the necessaryextern T handles.