board_build.stm32cube.custom_config_header = yes add that to every env:stm section https://github.com/ussserrr/stm32pio/issues/26