Skip to main content
Gregory3
Associate III
May 9, 2020
Solved

Cube IDE code generator

  • May 9, 2020
  • 1 reply
  • 1701 views

Hello!

I have 2 projects for two different controllers: one is the STM32F767 and the second one is the STM32H753.

I'm using the Cube IDE 1.3.1.

I have noticed , that when I generate a code, the the file structure looks different for both of them even when I try to ise exactly the same drivers.

For example when I use GPIO and LTDC, the for the STM32F767 I get such a structure (looks better for me):

0693W000000X9TwQAK.png

And when I generate the code for the STMH753 then I get such a structure and the initialization functions are directly in the main (not optimal for bigger projects):

0693W000000X9U1QAK.png

My question: How to change the automatic code generator to use the same way of working like for the STM32F767 (modular code)?

Regards,

Gregor

This topic has been closed for replies.
Best answer by TDK

In STM32CubeMX, go to Project Manager -> Code Generator -> Generate peripheral initialization as a pair of '.c/.h' files per peripheral

1 reply

TDK
TDKAnswer
Super User
May 9, 2020

In STM32CubeMX, go to Project Manager -> Code Generator -> Generate peripheral initialization as a pair of '.c/.h' files per peripheral

"If you feel a post has answered your question, please click ""Accept as Solution""."
Gregory3
Gregory3Author
Associate III
May 9, 2020

Thank you! That was what I was looking for :)