cancel
Showing results for 
Search instead for 
Did you mean: 

MCU1 to MCU2 migration option within STM32CubeIDE

ChahinezC
Lead

How to use STM32CubeIDE to migrate a project from MCU1 to MCU2?

In this FAQ, the question how to use STM32CubeIDE to migrate from MCU1 to MCU2 will be answered.

 
Note:
 
Currently STM32CubeIDE doesn't support the feature to import a project from one MCU to another.
The workaround is to generate project with STM32CubeMX as a stand alone tool and select STM32CubeIDE as target IDE.
 
  • Launch the project within STM32CubeMX, configure the pins, and generate the project for the MCU1, or open an already generated project with STM32CubeMX.
 
  • Start migrating from the MCU1 to MCU2: "Pinout & Configuration -> Pinout -> List Pinout Compatible MCUs
1318.jpg
 
  • In the menu “List Pinout Compatible MCUs” you will find compatible MCUs devices
 
  • The color shading and the Comments column indicate the level of matching:
 
- Exact match: the MCU is fully compatible with the current project
 
- Partial match with hardware compatibility: the hardware compatibility can be ensured but some pin names could not be preserved. Hover the mouse over the desired MCU to display an explanatory tooltip.
 
- Partial match without hardware compatibility: not all signals can be assigned to the exact same pin location and a remapping will be required. Hover the mouse over the desired MCU to display an explanatory tooltip.
 
  • From the window that appears you can choose the family you want to migrate to as well as the package.

Note:

- It is important to mention that moving from a single-core MCU to an advanced core like STM32H7 dual-core feature is not yet available.

- Please note that the versions used in this FAQ is 6.3.0 for STM32CubeMX and 1.7.0 for STM32CubeIDE, make sure to always upgrade the tools' versions you are using.

  • After finishing the comparison and selecting the compatible MCU just click on “OK, Import”.
 
  • The configuration is now applied for the selected MCU in STM32CubeMX.
​​​​​​​
  • At this point, select STM32CubeIDE from the "Toolchain/IDE" from the "Project Manager" section as presented in the photo below:
1319.png
Note:

When migrating with the STM32CubeMX project, from MCU1 to MCU2, a new IDE project will be generated.

The configuration parameters from the .ioc file will be translated to the new one, except the ones that concern pinouts and signals which are not in common between the two MCUs should be reconfigured.
  • Now you are able to generate your project for the new MCU with STM32CubeIDE tool.
Comments
Rassom
Associate II

Hello @Laura C.​ Thanks for this post. "OK, Import" button does not appear in my installation of CubeIDE version 1.10.1. Do you have any comment on that?

LauraCx
ST Employee

Hi

@ChahinezC​ will be able to help you.

ChahinezC
Lead

Hello @Rassom​,

As mentioned in the article, STM32CubeIDE doesn't support the feature to import a project from one MCU to another.

The workaround presented is to generate project with STM32CubeMX as a stand alone tool and select STM32CubeIDE as target IDE.

Did you face any issue while following the steps of the FAQ?

If so, can you please share the STM32CubeMX version you are using?

Thank you.

Chahinez.

Colorado Russ
Associate II

I attempted to use CubeMX 6.4.0 to migrate from STM32MP157FACx to STM32MP153C, but it failed because

"Project Import failed: Import 'STM32MP153CACx' not supported (multiple context)

Does "multiple context" mean dual core? All STM32MP1 devices are dual core.
_legacyfs_online_stmicro_images_0693W00000Y75WRQAZ.png

YShko.1
Associate II

I attempt to use the STM32IDE to migrate from stm32F030 to stm32G070 but i cant find the "ok, import" Button

can someone help me please?


_legacyfs_online_stmicro_images_0693W00000Y91glQAB.png

jdunne525
Associate II

For anyone trying to do this now, the "OK, Import" button still doesn't exist in the IDE as of STM32CubeIDE 1.14.1. 

 

You need to use CubeMX to change to the new part, then save the IOC and import it within the IDE if you want a new project.  In my case, I wanted just to swap to a different micro on an existing project, so I just replaced the  .ioc file and everything worked out okay for the most part.

I upgraded to a higher pin count part in the same family.  The core is even the same, but still I had to redo a lot of the settings.  It did save me a lot of time though, so it's worth doing this.

liteyear
Associate II

Worked for me today, as described, with STM32CubeMX 6.12.1. I recently used STM32CubeIDE 1.16.1 to upgrade my ioc file to 6.12.1, prior to following this procedure.

Only extra things I did were:

  1. Find STM32CubeMX for download! Didn't realise it still existed. Found it here.
  2. Set the "Project Name" and "Project Location" after setting the Toolchain / IDE. CubeMX pops up frequent warnings while you don't have it set. I set it to the same parent folder as the source project, with a different name, so I could diff the two projects and start the manual work.

Most settings were carried across. Several were lost (eg. some clock source settings, one UART flow control setting) and some needed updating (because they're not a one-to-one port). A side-by-side diff of the ioc and main.c files make this pretty easy, just a little time-consuming.

hakeila
Associate III

Hi @ChahinezC ,

 

I just updated the STM32CubeMX to version 6.13.0. I also updated the STM32CubeIDE to version 1.17.0 so the .ioc project is updated as well.

 

I have been trying to migrate from STM32H523CET6 to STM32H523RET6. I opened the current .ioc project and went to pinout menu, but the List Pinout Compatible MCUs is always inactive as shown in the attached image.

 

However, When I tried to create another project with a selection of MCU, This option is available.

 

I also have to mention that this .ioc project was originally configured to be support CMAKE and I changed it to STM32CubeIDE. 

 

What did go wrong? I don't want to start a new project from scratch.

 

hakeila_0-1733180825078.png

 

 

Regards,

Hani

Version history
Last update:
‎2021-09-03 05:27 AM
Updated by: