I have created a custom STM32H743VIT6 board. There is not a a generic board available (the closest is genericSTM32H750VBbut that is a quite different MCU. There are some dev boards such are the WeAct but they have customised pins and most of the pins on my board are pre-allocated (FMC, QSPI, SPI etc).
I’ve started to create a custom board/variant definition but there does not appear to be a way to share it publicly - ie via something like:
board = https://myrepo/myboard in platformio.ini
The advice appears to be to include the board/variant files in the project but that would mean replicating over multiple project folders/repos which doesn’t seem right.
Is there a way to make the board/variant definition public (this is for an open source project) and usable with the board = ?
Boards are usually a part of the platform, e.g., ststm32 (https://github.com/platformio/platform-ststm32/).
If you have a board definition that is useful to everyone, consider creating a pull request into the above platform to contribute it.
Actually that seems very right to me. A PlatformIO project either references everything it needs and tags it by version (e.g., platform = ststm32@19.7.0, lib_deps = arduino-libraries/SD@1.3.0) or have the needed files in the project itself (e.g., boards/my_board.json). This makes the project self-contained and easily transferable to another machine. The moment you rely on “you have to have previously installed this file onto your computer there..”, you’re loosing that.
Still, the PlatformIO core allows you to make that choice. The platformio core will search for boards in
boards/ folder of your project
<platform>/boards folder of the platform
<core dir>/boards folder of the core installation, e.g., C:\Users\<user>\.platformio\boards.
So, if you put your board definition into any of these two latter folders you don’t need to copy them per-project.
A way in between is: Create your own fork of platform-ststm32, where you put the board file in the boards/ folder, and reference your ststm32 fork via platform = <git link to your ststm32 form>.
Thank you Maximilian for your swift reply.
I optimistically hope the board would have multiple ‘app’ project, not necessarily written by me - so I’d would provide the board/variant files but they would then need to be replicated across multiple projects (I fully expect to be learning and updating regularly) - some of which I do not maintain.
Much as I would love to have my board in the core, I’m not sure it will have broad appeal!
The project would also need the variants folder (I’m using the Arduino framework as I have existing libraries).
Creating a fork of platform-stm32 seems like a big overhead for a board/MCU that already has a variant in the core repo - I really have to focus on getting the hal/lib/app code ported! I’ll still look into it of course…
I thought there might be a similar approach to the lib_deps links to repos but seems there is not - I was looking for a way to make life easy for end users of the board and libs I’m creating.
Thank you