modm-io / modm

modm: a C++23 library generator for AVR and ARM Cortex-M devices
https://modm.io
Mozilla Public License 2.0
733 stars 131 forks source link

Add board support for STM32F401 Discovery #1117

Closed cajt closed 8 months ago

cajt commented 8 months ago

Added a BSP for the F401 Discovery Board.

Notes:

rleh commented 8 months ago

The CI complains about two things:

cajt commented 8 months ago

We really need to take care of deduplicating the examples somehow, but that shouldn't stop this pull request.

From the abstraction side, the boards looked almost identical and could run mostly unmodified code (only difference was number of LEDs and their names).

The way I used the examples was basically a unit test, to check is the BSP is working. For use as code examples the level of abstraction is fine imho, and kinda what I would expect. To ease dealing with testing, a more abstract and generalized way of writing these might help. Especially for more elaborate tests. But that things can't do double duty as example and unit-test anymore (if that was ever intended).