cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX v6.13.0 generates broken CMake project files for STM32U5 devices

BFueldner
Visitor

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."

 
After looking in the generated CMake files, I spot various template artifacts:
 

 

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

0 REPLIES 0