Skip to main content
Mathan Raja
Associate III
June 9, 2023
Question

Re-arrange the generated code files in STM32CUBEIDE

  • June 9, 2023
  • 3 replies
  • 1304 views

Hi,

I want to rearrange the generated files of peripherals and protocols(like usart.c, tim.c, adc.c) from the core folder to the driver's folder and rename the core folder to the Application.

Is it possible in stm32cubeIDE?

Thanks

Mathan

    This topic has been closed for replies.

    3 replies

    Peter BENSCH
    Technical Moderator
    June 9, 2023

    Well, the STM32CubeIDE is based on Eclipse, so you have quite a lot of freedom.

    However, you have to bear in mind that a whole range of tools are gathered under its umbrella, which have their own idea of structure. When you create a project with the STM32CubeIDE, e.g. the STM32CubeMX tool creates all the C files, H files, etc.

    If you now reorganise everything, STM32CubeMX will not find its files again if you change the .ioc and then regenerate it, and will create the entire project anew - whereby no source text that you have inserted will be taken over. You may then be able to find your (first) files again, but it is guaranteed not to be much fun to insert the changes into the first file variants.

    Is there a specific reason to change the file structure?

    Regards

    /Peter

    Mathan Raja
    Associate III
    June 9, 2023

    Well, there is no specific reason. Thanks

    Peter BENSCH
    Technical Moderator
    June 22, 2023

    OK, if the problem is solved, please mark this thread as answered by selecting Accept as Solution, as also explained here. This will help other users find that answer faster.

    Regards
    /Peter