cancel
Showing results for 
Search instead for 
Did you mean: 

Generated Dual-Core CMake project Path typo

drewhanshaw
Associate II

Hello,

I've generated code for a dual cure MCU (stm32H755) and tried to build the project (on a unix system). However, I get an error in `mx-generated.cmake` indicating that the startup file cannot be found. I tracked down the issue to the directory for the startup `.s` file being in `startup` all lowercase, while the CMake expects `Startup` (capital S).

 

Here's an example:

target_sources(${CMAKE_PROJECT_NAME} PRIVATE
    ./Src/main.c
    ./Src/stm32h7xx_it.c
    ./Src/stm32h7xx_hal_msp.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash_ex.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_gpio.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma_ex.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mdma.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c_ex.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_exti.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.c
    ../Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.c
    ../Common/Src/system_stm32h7xx_dualcore_boot_cm4_cm7.c
    ./Src/sysmem.c
    ./Src/syscalls.c
    ./Startup/startup_stm32h755xx_CM4.s
)

 

Based on the convention set by the other directories (Drivers, Src, etc.), the the path should start with a capital letter, so the generated startup file should be placed in a different directory, and the generated CMake should not be changed.

I can easily make this change manually, but since this file is generated, I'd rather not have to modify it

4 REPLIES 4
STTwo-32
ST Employee

hello @drewhanshaw 

I'm not able to reproduce this issue on my side (I don't have a Linux PC now). Could you please. give me more details on how to reproduce that. The .ioc file will help also.

Best Regards.

STTwo-32

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.

drewhanshaw
Associate II

Hello,

Apologies for the late reply. I was able to recreate the issue by creating a new project for the STM32H7, going to project manager, entering a project name and location, selecting CMake for the toolchain/IDE, and generating the code. The result is a generated Core/startup directory (lowercase s in startup), while the `mx-generated.cmake` uses Core/Startup (capital S in startup). See below:

drewhanshaw_1-1727192711575.jpeg

I've also attached the .ioc here. I'm macOS Sequoia, with cubeMX version 6.12.0

 

Also, given that cubeMX now supports CMake, it would be nice if these community forums supported uploading .cmake files as attachments :)

drewhanshaw_0-1727192475779.jpeg

 

Hello @drewhanshaw 

I've been able to reproduce the issue, and I've reported to the concerned team for correction (under internal ticket number 191993).

Best Regards.

STTwo-32

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.

Do you have an update on this ticket?