CMake project bug in cubeMX6.14.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2025-03-31 1:09 AM
On a NUCLEO-H7S3L8 I've been testing the Projects/NUCLEO-H7S3L8/Applications/USBPD from STM32Cube_FW_H7RS_V1.2.0 with cubeMX6.14.0. I use the VScode extension, so I select the CMake toolchain. I select the "copy only necessary files" in code generation.
I noticed a different behaviour when I just copy the .ioc file from the example (and just select CMake) to when I use the "access to example selector" button of cubeMX. The .ioc file in the example does not specify the specific board: it has board=custom, while the one from the example selector has: BSP_IP_NAME=NUCLEO-H7S3L8 board=NUCLEO-H7S3L8. That is the only difference I see in the .ioc files.
The code generated from either of these does not operate correctly.
With example selector:
- BSP code is added in the folder and included in CMake files.
- The libraries are not referenced in CMake files. For example, all the *HAL_Driver/Src/* files are missing in set(STM32_Drivers_Src part of mx-generated.cmake. The same holds for all Middleware libraries.
- As a result, the project does not even build.
With copying the .ioc from the example:
- The BSP code is not added in the folder and it is not referenced in the CMake files.
- The libraries, however, are correctly referenced in the CMake files.
- As a result, the project builds, but because the BSP code for the board is missing, it does not work on the board.
There must be a bug somewhere in the code generation script, which does not produce the library references in the CMake files when BSP code is included. I haven't tried on anything other than CMake.
As a workaround, I just build both and then compare all the CMake related files and fix them.
- Labels:
-
Bug-report
-
STM32CubeMX
-
STM32H7 Series
