Arduino_core_STM32 support (improved) #1571
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding Arduino_core_STM32 support
Three previous attempts of adding STM32 support were abandoned (#1422, #1437, #1486).
@tekka007 s branch also served as inspiration. Thanks to everyone of you.
I'm asking you to please consider my attempt :-) @tekka007 @mfalkvidd
Risks
The change is rather local in hal/STM32 and should not cause problems with other architectures.
I've kept the existing legacy hal/STM32F1 unchanged and the respective constant is checked in MySensors.h before my STM32 addition. This should maximize backward-compatibility for STM32F1 (blue pill) legacy users.
Implemented in this version
Planned
Build
I developed under VS Code + Platformio on Windows. I test-compiled examples under the Arduino IDE (also Windows).
Testing
I've tested mostly on a generic black pill STM32F401CE (gateway, node using Ra-01 LoRa and nRF24L01+).
I encourage to test on a broader variety of boards.
Final note
The code has mostly been generated using AI. I asked for a comprehensive review of the previously mentioned three abandoned STM32 PRs and a comparison between building on STM32duino vs the original STM32Cube HAL. Both are feasible but the simplicity of the STM32duino solution stood out.