Falsely listed support; Unable to override a board's default dependancies

I’m looking to start a fairly large project on an STM32H723 based MCU and I have a ST Nucleo H723ZG. Luckily for me, this is listed as a supported board on the platformio website…except it isn’t actually supported. I started a new project for this board using the CMSIS framework, but here’s the fun part, the version of the CMSIS library that platfomio pulls from it’s package index is out of date and doesn’t have support for the H723*** chips. So when you try to build the project, it obviously cannot find the right header files and it fails. I opened an issue on the github page to hopefully get a long term fix (should be as simple as updating the package), but I need a temporary work around.

So I added the CMSIS repository directly to my project via
lib_deps = https://github.com/STMicroelectronics/cmsis_device_h7.git
and pio picked up the repository and added it to my lib_deps folder for this project, however the build still fails because it seems to get quite confused and tries to compile using a mix of the files in the package it associates with the board (the out of date version) & the my independantly added packages. I can’t seem to find a way to override the board level dependencies and I’m looking for some help.

also a quick side note; it really really hurts the usability of PIO when tons and tons of packages are multiple years out of date from their origin repositories. I really want to love this tool but stuff like this that prevents me from even just starting a project on a “supported” board kills it

It’s not that easy. The repo doesn’t have a PlatformIO-specific library.json or any scripts that would correctly select which source files to build (srcFilter) and the include paths to setup. And it doesn’t even include things like core_cm7.h because that’s expected in the base CMSIS package (CMSIS-5), which PlatformIO has an outdated version of. That all mixes very badly. You were right to fill a bug at https://github.com/platformio/platform-ststm32/issues/715 and the developers should fix this.

If you really want to implement it yourself, I’d suggest starting a baremetal project, i.e., a deletion of any framework = ... line in the platformio.ini, and manually copying the CMSIS-5 core files and CMSIS STM32H7 files (headers, only the correct startup file, only the correct linker file, only the correct system file) into the project and configuring build flags and linker script via platformio.ini.

I appreciate your explanation on how to get around this with a bare metal project. I wish that there was official documentation on that since I spent a good while yesterday looking around for ways to override the board-level/framework dependencies and couldn’t find much. I’m not sure if the docs are open source as well but it would be great to get a page on bare-metal project. i.e how to configure the platformio.ini file

It seems one of the devs "solved’ the problem on the dev branch by just removing support for cmsis all together :laughing:. looks like bare metal project is gonna be the only way to go for proper control over what’s going on.