Skip to main content
Mvill.17
Associate III
May 30, 2019
Question

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

  • May 30, 2019
  • 2 replies
  • 1044 views

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.

2 replies

Martin KJELDSEN
Principal III
June 3, 2019

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
June 10, 2019

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
June 11, 2019

Okay Marco,

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

/Martin

Mvill.17
Mvill.17Author
Associate III
June 11, 2019

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