I have found a few bugs in the framework-stm32cubeh7 code. I have some fixes, but I am not sure where to submit updates.
First, if I include a usbd_conf.c file of my own, it conflicts with the usbd_conf_template.c file that exists at here: packages/framework-stm32cubeh7/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_conf_template.c
In order for my project to compile, I have to delete this file. I would normally use a library.json file, but I can’t find any documentation on how the package.json file works, if it works similarly.
Secondly, there are two function declarations that have incorrect argument data types. They are set to uint32_t, but the function code actually uses uint16_t.
Once PIO automatically installed the stm32cube framework, i have to delete a file, and change these two variables in the framework files in order to get the project to compile.
Any thoughts on how to handle this one?
If the bugs are not PlatformIO specific, should the fixes not be against the upstream code? I could be wrong, but I think the code you are referencing comes from here: GitHub - STMicroelectronics/STM32CubeH7: STM32Cube MCU Full Package for the STM32H7 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
Perhaps see if there is an issue or PR that hasn’t been accepted yet fixing the issues?
To do changes similar to what you want - i.e. changes to the platform/framework files that will survive an update, have a look at Advanced Scripting, or more specifically the override platform files section. I use this same concept myself to fix up a code issue that seems to affect PlatformIO but not the Arduino IDE… Patch the DEBUGV issue until a fix is found (3a04e4ab) · Commits · Peter Feerick / MrDIY Audio Notifier · GitLab