Skip to main content
Mvill.17
Associate III
May 30, 2019 12:50 PM UTC
Question

GRAPHICS_Init() in BoardConfiguration.cpp is modifed by CubeMX every time I generate a new project. Why?

GRAPHICS_Init() in BoardConfiguration.cpp is continuosly overwritten when I generate a new project with CubeMx 5.0 and this is particularly boring as I have to use my custom initialization for the LCD (specifically the LANDSCAPE orientation). Is it a bug of CubeMX ? Is there a way to tell CubeMX not tou touch that function?

This topic has been closed for replies.

7 replies

Martin KJELDSEN
Principal III
Jun 3, 2019 8:53 AM UTC

Hi @Mvill.17​,

I feel your pain. CubeMX has a tendency to overwrite things it shouldn't. And overwrite fixes to things that weren't generated correctly. If you can give me a very specific example of what you're experiencing i can send it along to the cubeMX team.

A tip for a more bearable solution to this is to commit BoardConfiguration.cpp with git and simply restore it with "git checkout BoardConfiguration.cpp" every time CubeMX misbehaves.

/Martin

Mvill.17
Mvill.17Author
Associate III
Jun 10, 2019 11:32 AM UTC

Thank you for the answer.

It's not a big issue: I'm working on a project based on the STM32F429 discovery. This board has a 240x320 display but as my board will have a 320x240 display I had

to rotate the display and so every time I update the project from CUBEMX it restore the things for the original display deleting my customizations.

Martin KJELDSEN
Principal III
Jun 11, 2019 7:40 AM UTC

Okay Marco,

And you're sure that none of these modifications cannot be done directly in cubemx?

/Martin

Mvill.17
Mvill.17Author
Associate III
Jun 11, 2019 10:53 AM UTC

I'm not totally sure but can you suggest me where, in Cubemx, I can set the LANDSCAPE orientation perhaps?