cancel
Showing results for 
Search instead for 
Did you mean: 

How to merge two configurations made with STM32CubeMX in different project?

Andrea Canepa
Senior

If I have done two different project using different peripherals, how can I import the peripherals settings contained in project #2 into project #1?

If for example in a project I have configured some timers to perform a certain function. Then in another project I set up other timers to perform another function. Then I need to do both of those functions, so I have to merge the configurations contained in the two projects to create a new one. Made myself clear?

Andrea

6 REPLIES 6

I understand the request, not a CubeMX advocate, but seems like a use case that cries to be supported by such a tool.

Try creating Project#3 by WinMerge-ing the two .IOC, to at least understand the facets that have changed and the detail inferred.

@Kristof Mulier​ looks to have been doing some scripting/automation work with CubeMX, there is perhaps some insight to be gained from that work, and focusing ST on improving the tools.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

Straight merging .ioc files won't work.

For just a few not too large projects, I would just print out the PDF reports produced by Cube (with all components modes, settings etc) and add these few timers into the recipient project manually in the GUI.

This is indeed a common situation, when we make a small experimental project for some component, then merge it to the real project.

-- pa

I think it would be useful to allow the saving/sharing of templates or building blocks, so you can combine elements of previous projects to create a whole, while letting you test evaluate individual components.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
S.Ma
Principal

Starting from the possiblity to combine Nucleo peripheral cube SW examples from CubeMX?

It would be enough to take a cue from "Processor Expert" of NXP (ex Freescale): it did exactly this!

Andrea

Hi @Community member​ , I have indeed done some scripting with CubeMX: Generate a CubeMX project, set some configurations and generate the code. All from the command line.

Unfortunately CubeMX scripting (command line interface) is not well documented. It's mostly guessing and trial-and-error.

But at least, STMicro has a standalone tool like CubeMX (even with a command line interface). Most other microcontroller vendors rely on an Eclipse plugin, abandoning all non-Eclipse users. That's complete madness. I pray every night that STMicro keeps the standalone CubeMX alive.