cancel
Showing results for 
Search instead for 
Did you mean: 

BUG: stm32cubemx on every save change some values randomly

vromanov
Associate II
Posted on March 31, 2015 at 22:34

Hi!

How to reproduce

1) Save copy of .ioc file.

2) Open project in CubeMx.

3) Don't change anything. Just save project

4) Compare file whit saved copy.

You will found many differences like this

-PA9.GPIOParameters=GPIO_ModeDefaultOutputPP,GPIO_Label,GPIO_Speed,GPIO_PuPd

+PA9.GPIOParameters=GPIO_Label,GPIO_ModeDefaultOutputPP,GPIO_Speed,GPIO_PuPd

-PC1.GPIOParameters=GPIO_ModeDefaultOutputPP,GPIO_Label,GPIO_Speed,GPIO_PuPd

+PC1.GPIOParameters=GPIO_Label,GPIO_ModeDefaultOutputPP,GPIO_Speed,GPIO_PuPd

-PC4.GPIOParameters=GPIO_ModeDefaultOutputPP,GPIO_Label,GPIO_Speed,GPIO_PuPd

+PC4.GPIOParameters=GPIO_Label,GPIO_ModeDefaultOutputPP,GPIO_Speed,GPIO_PuPd

Cubemx change order of items in list in random. This is very bad for source control. This is source for merge problems in team work.
6 REPLIES 6
markb
Associate II
Posted on April 01, 2015 at 07:53

I don't think they consider that people use source control because they update the time stamps on generated files even when none of the contents have changed so you have to look at every file to see if there was a ''real'' change or not after generating.

Amel NASRI
ST Employee
Posted on April 01, 2015 at 09:52

Hi,

The order of parameters doesn't impact the generated code. You can check that the generated code is the same based on both .ioc files.

Anyway, there will be an action to fix this.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

markb
Associate II
Posted on April 01, 2015 at 10:00

Sorry, I meant to say that the date/time inside the generated files is changed even when the generated code is the same rather than the file's timestamp has changed (which it does, anyway). So all the files are needlessly altered every time you generate them even if, say, only 1 has real altered content. It's a real pain from the source code control  side of things.

vromanov
Associate II
Posted on April 01, 2015 at 15:09

If order not important, please dont change it. For sample, sort parameters before save. This is real pain if two developers change different parameters to merge this changes. You must resolve conflicts on every parameters list. And please don't write current time to file!

This useless information mark file as changed on every code generation.

stm32cube-t
Senior III
Posted on April 07, 2015 at 16:58

Hello,

We are taking into account your request to remove timestamps and keep parameters order in the ioc file. To be delivered asap in a next release.

Best regards

stm32cube-t
Senior III
Posted on July 01, 2015 at 11:52

Hello your request has been solved in current release: STM32CubeMX 4.8