cancel
Showing results for 
Search instead for 
Did you mean: 

How to migrate a project from IAR to STM32CubeIDE

PBlan.1
Associate

I have an old project on IAR and I have to update it using STM32CubeMx and STM32CubeIDE. Any way to get this done or any advice on this subject is welcome. I am not very experienced with STM32cube.

3 REPLIES 3
Pavel A.
Evangelist III

Which STM32 do you have?

> I am not very experienced with STM32cube.

Then maybe the fastest way is to find a consultant/contractor.

Otherwise begin from checking which specific features of the IAR does the project depend on:

* compiler features (high optimization, PIC or execute-only code, C language extensions, inline assembly)

* runtime library features

* instrumentation, validation, profiling features

If there are no blockers, begin from creating a quick protype in CubeIDE (with or without the Cube code generation), familiarize yourself with CubeIDE (GNU) startup code and linker scripts.

(else, obviously, resolve the blocking issues first).

Finally... try to ask your IAR dealer for better pricing or more flexible license :) If they give in, just keep enjoying your existing setup :)

Foued_KH
ST Employee

Hello @PBlan.1​ ,

I recommend waiting to migrate to STM32CubeIDE until you have a new project and not migrate as it's not guaranteed to work.

However, you can copy and paste (source and include) under your STM32CubeIDE project from IAR project before creating new project.

Foued

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

S.Ma
Principal

I have done this before and made notes because there were lots of small pitfalls.

First, create a new cubeide project for your target mcu and desired clocktree setup. Then check if it rebuildall ok. Do it regularly to know when you break something in the step by step project.

Make sure your source file extensions are lowercase .h or .c otherwise you will know what I faced.

Then drag and drop progressively your source files in the new project until build is ok.

#pragma specific in source code may need translation.

Then what is lost from IAR are

Workspace file

Compiler default source search path to retell, compile options, .map file generation, etc...

Linker file, memory mapping, segments... need to be retold.

Then check the interrupt ISR vector and ISR handlers are ok.

Let us know how long did it take and what was time consuming.