Skip to main content
Andrea Canepa
Senior
February 6, 2019
Question

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

  • February 6, 2019
  • 3 replies
  • 2225 views

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

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
February 6, 2019

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Kristof Mulier
Associate III
February 7, 2019

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.

Pavel A.
Super User
February 6, 2019

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

Tesla DeLorean
Guru
February 6, 2019

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Andrea Canepa
Senior
February 7, 2019

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

Andrea

S.Ma
Principal
February 6, 2019

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