cancel
Showing results for 
Search instead for 
Did you mean: 

Porting Project to Pin Compatible MCU in STM32CubeIDE

KYin.2
Associate II

I am currently working on a motor controller project with the STM32G473RE.

I am trying to get more prototype boards made but the STM32G473RE is not in stock anywhere with long lead time

I see that the STM32G474RC has plenty of stock in multiple locations and I want to port my project from the STM32G473RE to the STM32G474RC.

The MCUs are entirely pin-to-pin compatible, the only difference being the STM32G474RC having half as much flash memory (which I am fine with and in fact prefer the lower cost) and the HR Timer (unused).

How would I go about doing this in an effective manner?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

Close STM32CubeIDE, open just the .ioc in CubeMX, leaving your project as is. After switching the MCU, you can generate code in either tool as usual. If you have put your code within USER BEGIN / END blocks, there is no need for copy and paste. You should, of course, have a backup ready for just in case.

hth

KnarfB

View solution in original post

4 REPLIES 4
KnarfB
Principal III

When you open the .ioc in STM32CubeMX stand-alone tool, under Pinout there is a drop-down menu with a List Pinout Compatible MCUs entry (Alt+L). You should be able to pick the MCU of your choice and press OK, Import to switch to the new MCU. The same view within STM32CubeIDE didn't work for me, however.

hth

KnarfB

So would have to port the project in steps? use CubeMX to create a new configuration project, then create a new project in cubeide from that new configuration and copy paste the relevant code files?

Thanks.

Close STM32CubeIDE, open just the .ioc in CubeMX, leaving your project as is. After switching the MCU, you can generate code in either tool as usual. If you have put your code within USER BEGIN / END blocks, there is no need for copy and paste. You should, of course, have a backup ready for just in case.

hth

KnarfB

Cchas.1
Associate

That doesn't work. It just creates a new project that needs to be imported