2026-05-12 BSP Interfaces #472
simon-d-bmw
started this conversation in
Ideas
Replies: 1 comment
-
|
Merged in main: 489448c |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
2026-05-12 — IPB2 Arch Sync 2: BSP Interfaces in OpenBSW
Participants
Problem
Current OpenBSW convention: application code must include both
UartConfig.hand
Uart.h. Proposal: makeUart.hincludeUartConfig.hdirectly so consumersonly need one include.
Key tensions
High performance vs. platform independence
(e.g. inline, constant-fold register access). This means the interface
must depend on the implementation — accepted design constraint.
compiles against any BSP target without including platform-specific headers.
Challenge: does it make sense to write application code that is completely
independent of the module configuration?
Static configuration benefit
getInstance) avoids runtime lookup cost.Matthias's alternative: dependency injection
Uart) fromintegration code, rather than constructing/getting it directly.
BSP module configuration structure
BSP module config consists of two parts:
Configuration structures are used as forward declarations in headers to decouple
applications from hardware-specific properties.
UartConfigis different on eachtarget.
Architecture observation (Andrey)
The current build dependency graph shows:
This is the reverse of the ideal direction. The group acknowledged this but
agreed it follows from the high-performance / static-config constraint.
Concepts (
C++20) are used in CI builds but not enforced in production code.Outcome
Beta Was this translation helpful? Give feedback.
All reactions