STM32CubeMx CLION

Hi all,

I'm trying to create a new project from CLion with stm32CUBEmx. I've followed this link : https://www.jetbrains.com/help/clion/embedded-development.html#new-project

But when I try to generate new code for my board (for example STM32F407 disc) I've always in my projet tree STM32F030F4PX-FLASH.ld and also all directory relative to this MCU, and the CmakeLists mix all 2 mcu on it for example : (I'm new on Clion maybe I didi something wrong, I'm on Ubuntu CLion Build #CL-241.15989.121, built on April 25, 2024 and CubeMX 6.11.1)

include_directories(Inc Drivers/STM32F0xx_HAL_Driver/Inc Drivers/STM32F0xx_HAL_Driver/Inc/Legacy Drivers/CMSIS/Device/ST/STM32F0xx/Include Drivers/CMSIS/Include Drivers/STM32F4xx_HAL_Driver/Inc Drivers/STM32F4xx_HAL_Driver/Inc/Legacy Middlewares/ST/STM32_USB_Host_Library/Core/Inc Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc Drivers/CMSIS/Device/ST/STM32F4xx/Include Inc Drivers/STM32F4xx_HAL_Driver/Inc Drivers/STM32F4xx_HAL_Driver/Inc/Legacy Middlewares/ST/STM32_USB_Host_Library/Core/Inc Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc Drivers/CMSIS/Device/ST/STM32F4xx/Include Drivers/CMSIS/Include)
0

1. Make sure that you have STM32CubeIDE toolchain

2. I often made the mistake to put “Project Location" equal to the root folder of the code (i.e where the .ioc file is). I now have it one level up.

3. And the Toolchain Folder Location is the root folder of the code.

You will end up with additional .ld file and can safely remove the STM32F030…ld and also a directory Drivers/STM32F030….
Below is a screenshot of my settings.

HTH

 

0

请先登录再写评论。