2024-12-18 08:26 AM
Hi,
I use STM32CubeMX v6.13.0 to generate a CMake project for STM32U5 devices. While code generation the process aborts with following error message:
"The Code is successfully generated under: /home/user/projects/stm32u5_firmware Project language : C but CMakeproject generation have a problem."
cmake_minimum_required(VERSION 3.22)
project(stm32cubemx)
add_library(stm32cubemx INTERFACE)
{{sr:Enable_CMake_lanuages}}
target_compile_definitions(stm32cubemx INTERFACE{{sr:symbols_c_SYMB}}
$<$<CONFIG:Debug>:DEBUG>
)
target_include_directories(stm32cubemx INTERFACE{{sr:include_c_DIRS}}
)
target_sources(stm32cubemx INTERFACE{{sr:sources_SRCS}}
)
target_link_directories(stm32cubemx INTERFACE{{sr:link_DIRS}}
)
target_link_libraries(stm32cubemx INTERFACE{{sr:link_LIBS}}
)
# Validate that STM32CubeMX code is compatible with C standard
if(CMAKE_C_STANDARD LESS 11)
message(ERROR "Generated code requires C11 or higher")
endif()
{{sr:Verify_CPP_STD}}
Using another controller (e.g. STM32F407) everything works fine. Any idea?
Best regards,
Ben
2024-12-19 12:29 AM - edited 2024-12-19 12:40 AM
Hello @BFueldner ,
Thank you for bringing this issue to our attention!
Could you please attach your log file for further investigation of the issue?
KR,
Souhaib
2024-12-19 02:36 AM - edited 2024-12-19 02:39 AM
Hi @Souhaib MAZHOUD,
how does STM32CubeMX generate log files? The only output in the bottom of the window is:
Loading: /home/user/STM32CubeMX/db/plugins/boardmanager/boards/B55_Nucleo_NUCLEO-U5A5ZJ-Q_STM32U5A5ZJ_Board.ioc project
Initializing: STM32U5A5ZJTxQ
See attached the IOC and the CMakeLists.txt. For me it seems that the CMakeProject template did not get the right files to solve the placeholders. In the .mxproject file (renamed in attachment to mxproject.txt) all needed files are listet.
Best regards,
Ben