I tried to implement a custom stm32 board with zephyr in PlatformIO and noticed that in the framework-zephyr-hal-stm32 folder the dts folder where missing. It look like PlatformIO did not use this part of the HAL for all stm32 boards at all.
Why is that so?
The folder contains auto generated dtsi files that descrip the full chip pinout.
They are an essential part for the boards device tree structure.
I guess that this is the reason PlatformIO only supports stm32 boards with Arduino Uno Connector.
These board have a arduino_r3_connector.dtsi file to descrip only the used pins of the board.
So this dtsi file for the Uno connector is enough to fully use the board.
It would be great to add support for the auto generated dtsi files. This would add already supported boards with non Arduino Uno connector and simplify to add custom stm32 boards.
Simple, because at the time the PlatformIO package for framework-zephyr-hal-stm32 was created, it didn’t exist. PlatformIO has its own package management system where maintainers created packages when a new stable version of a framework (example) is released. No beta software or bleeding edge software is supported.
The files you’re talking about were added Sept. 29th 2020, this PlatformIO version of it is from commit cea57f86d3 (see version field in the pacakge.jsonof framework-zephyr-hal-stm32, which is from 22nd July. The latest Zephyr 2.4.0 release was done on 27th september, so it doesn’t even include these new DTS files since they were added 2 days later.
The released Zephyr 2.4.0 version which the current STSTM32 platform version integrates with didn’t have that file at the time, to be exact.
When a new Zephyr version is released that has these files, PIO will update as normal.