cancel
Showing results for 
Search instead for 
Did you mean: 

I don't understand how I can import an example from a MCU package extension, like STM32Cube MCU Package for STM32L1 series, to STM32CubeIDE environment.

MStef.1
Associate II

If I try to use the import comand, from File menu of STM32CubeIDE, to load an example selecting "import STM32Cube example" option I can't load a project only available in source form. The window that open, were we have a list of available projects for a specific board, in my case NUCLEO_L152RE, only shows the example projects (I think) that have a predefined project structure. Then for me it is non sense to put examples in MCU package extension that I can't use. Or, and this is the wrost, if I want to use it I have to choose a way to convert this example project from a toolchain format; a way abssurdely complicated.

I kindly ask help to solve this problem or someone to tell me that isn't possible to do what I want. Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Guillaume K
ST Employee

this project GPIO_IOToggle is delivered with project files for System Workbench for STM32 IDE under SW4STM32 directory. It does not contain STM32CubeIDE project files.

It is possible to import SW4STM32 project files (.project and .cproject) in STM32CubeIDE by using menu "File / Import" then "General / Import Ac6 system workbench for STM32 project".

View solution in original post

7 REPLIES 7
Cartu38 OpenDev
Lead II

Please could you share which MCU package extension we are discussing about ?

Which example / application are you interested to ?

Guillaume K
ST Employee

what do you mean by "I can't load a project only available in source form" ? could you give an example ?

Maybe instead of menu "FIle / Import" then "General / Import STM32Cube example" you could try "File / Import" then "General / Existing projects into workspace".

MStef.1
Associate II

Hi all

Thanks for yours answers.

The MCU package extension I'm talking about is STM32Cube_FW_L1_V1.10.3. In this package there is the \Projects\NUCLEO-L152RE\Examples\GPIO\GPIO_IOToggle\Src directory where is the souce code i want to use.

I don't understand how I can create a new project in STM32CubeIDE starting from this source code.

Guillaume K
ST Employee

this project GPIO_IOToggle is delivered with project files for System Workbench for STM32 IDE under SW4STM32 directory. It does not contain STM32CubeIDE project files.

It is possible to import SW4STM32 project files (.project and .cproject) in STM32CubeIDE by using menu "File / Import" then "General / Import Ac6 system workbench for STM32 project".

MStef.1
Associate II

Thanks a lot for your answer.

I imported the project and I build it correctly. So thanks for your explanation.

I have to ask if exist a document from STM where I can find a complete description of structure of STM32CubeIDE project. Sorry but I'm a old school software developper and I have to have all under control to be sure don't make mistakes. The new IDE, like STM32CubeIDE, hide to the user a lot of basic code.

mattias norlander
ST Employee

Hi @MStef.1​ ,

Example projects are excellent to quickly start exploring different features of the products and different firmware drivers - to learn!

But, old example projects targeting the SW4STM32 and TrueSTUDIO toolchains (without ioc-file) were delivered with only the IDE project file and a few source files like main.c being "physically part of the project". The rest of the source and header files where linked to the project or only setup as include paths to the compiler.

Consequently these (SW4STM32 or TrueSTUDIO) projects are hard to "re-use" as templates for your own project without playing detective and resolve all source and header files first into a real self-sustained project.

This has been improved in later CubeFW package with an ioc-file allowing to generate all the source/header files INSIDE the project.

Sorry about the inconvenience. Lesson learned, but too late for L1 series.

MStef.1
Associate II

Thanks for your explanation. For sure an example project without the .ioc file is quite complicated to use it. In my case Guillaume K provided me enough information to solve my problem.

If you can suggest me document/s that support me to understand the file structure of a STM32CubeIDE project may help me a lot.