2025-09-12 3:02 AM
I have tried to generate a project with the STM32U5F7VJT6 and ThreadX, the generation fails saying the cmake project generation had failed. Checking the cmake file, it is full of placeholders.
cmake_minimum_required(VERSION 3.22)
{{sr:Enable_CMake_lanuages}}
# STM32CubeMX generated symbols (macros)
set(MX_Defines_Syms{{sr:symbols_c_SYMB}}
$<$<CONFIG:Debug>:DEBUG>
)
# STM32CubeMX generated include paths
set(MX_Include_Dirs{{sr:include_c_DIRS}}
)
# STM32CubeMX generated application sources
{{sr:STM32_Application_ToReplace}}
# STM32 HAL/LL Drivers
{{sr:STM32_Drivers_ToReplace}}
# Drivers Midllewares
{{sr:drivers_midllewares}}
# Link directories setup
set(MX_LINK_DIRS
{{sr:link_DIRS}}
)
# Project static libraries
set(MX_LINK_LIBS {{sr:link_LIBS}}
STM32_Drivers
${TOOLCHAIN_LINK_LIBRARIES}
{{sr:list_library}}
)
# Interface library for includes and symbols
add_library(stm32cubemx INTERFACE)
target_include_directories(stm32cubemx INTERFACE ${MX_Include_Dirs})
target_compile_definitions(stm32cubemx INTERFACE ${MX_Defines_Syms})
# Create STM32_Drivers static library
add_library(STM32_Drivers OBJECT)
target_sources(STM32_Drivers PRIVATE ${STM32_Drivers_Src})
target_link_libraries(STM32_Drivers PUBLIC stm32cubemx)
{{sr:Verify_CPP_STD}}
{{sr:add_library_ToReplace}}
# Add STM32CubeMX generated application sources to the project
target_sources(${CMAKE_PROJECT_NAME} PRIVATE ${MX_Application_Src})
# Link directories setup
target_link_directories(${CMAKE_PROJECT_NAME} PRIVATE ${MX_LINK_DIRS})
# Add libraries to the project
target_link_libraries(${CMAKE_PROJECT_NAME} ${MX_LINK_LIBS})
# Add the map file to the list of files to be removed with 'clean' target
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES ADDITIONAL_CLEAN_FILES ${CMAKE_PROJECT_NAME}.map)
# Validate that STM32CubeMX code is compatible with C standard
if((CMAKE_C_STANDARD EQUAL 90) OR (CMAKE_C_STANDARD EQUAL 99))
message(ERROR "Generated code requires C11 or higher")
endif()
Solved! Go to Solution.
2025-09-12 4:12 AM
Hello @YamiTheWitch
Based on UM1718 :3.1.1 Supported operating systems and architectures
CubeMX officially supports Ubuntu LTS 22.04, 24.04, and Fedora 41
Nobara 42 is not officially supported by STM32CubeMX 6.15.0.
For best results, use a supported operating system such as Fedora 41 or Ubuntu LTS 22.04/24.04 in a virtual machine or container.
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-09-12 3:35 AM
Hello @YamiTheWitch
Could you please provide more details about your operating system also it would be helpful if you could share your IOC?
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-09-12 3:58 AM
I am using 64bit Linux using the most recent version of Nobara 42.
2025-09-12 4:12 AM
Hello @YamiTheWitch
Based on UM1718 :3.1.1 Supported operating systems and architectures
CubeMX officially supports Ubuntu LTS 22.04, 24.04, and Fedora 41
Nobara 42 is not officially supported by STM32CubeMX 6.15.0.
For best results, use a supported operating system such as Fedora 41 or Ubuntu LTS 22.04/24.04 in a virtual machine or container.
THX
Ghofrane
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.