cancel
Showing results for 
Search instead for 
Did you mean: 

Suggestion: CubeMX to generate hal-style code but not fiddle with main() etc.

kyrreaa
Associate III

I find it very impractical that CubeMX keeps regenerating entire project to update clock tree and/or adjust settings for some hw units and in so doing deletes the original folder by renaming it and creating a new one. It's job should be to aid in hal and similar abstractions and to assist in the configuration. Having it stay away from the main application and usercode would be good.

Maybe an option to use it in library-mode would work?

The way it is now, it is only useful for the initial setup and after that it is a huge liability and incompatible with version control systems like GIT...

5 REPLIES 5
berendi
Principal

Have CubeMX generate code to a separate tree, and copy just the changed files or functions over to the live project tree.

kyrreaa
Associate III

Yes, that is what I have to do now but it is not very nice.

berendi
Principal

It gives you a way to review each piece of code before it enters the project tree that you are responsible for, preventing some nasty surprises.

kyrreaa
Associate III

That is what a commit is for...

But when it deletes the entire git repository I get a bit annoyed.

Also, it is a platform support tool and should have a mode to behave as such.

Pavel A.
Evangelist III

> But when it deletes the entire git repository I get a bit annoyed.

Push the repository to a remote server before doing dangerous things in the working copy. It will be safe there.

> Also, it is a platform support tool and should have a mode to behave as such.

?? What is a platform support tool?

-- pa