2.9k views
in Getting started by
Hello Embedded Wizard,

unfortunately ST stopped the development of TrueSTUDIO, therefore I have to switch to the new STM32CubeIDE with my Embedded Wizard IDE project.

I have tried to use the 'Import Atollic TrueSTUDIO' function, but that doesn't work. After that, STM32Cube32 reports that some files are missing. It's sad that the import doesn't work correctly. Can you please give advice what's to do to use STM32CubeIDE?

Fridolin

2 Answers

0 votes
by

Hi Fridolin,

as reason of we have got several request regarding to the new STM32CubeIDE, I would like to answer here in general what’s to do to use STM32CubeIDE with our TrueSTUDIO preconfigured project.

Unfortunately the import function build in in the new STM32CubeIDE, changes some rudimentary things in our Embedded Wizard project made for TrueSTUDIO. To use our Embedded Wizard eclipse project with STM32CubeIDE, please do the following steps.

This guide is very detailed. Depending of the experience level, it could be that one or several steps are self-explained and able to skip. It isn’t rocket science, even when a lot of steps are necessary :-P

I have made this guide for STM32CubeIDE v1.0.0, Embedded Wizard 9.20 and STM32F746-Discovery. The steps are the same for all ST boards, maybe with some slightly differences like the MCU selection or path and library names. If you have any trouble following the steps with another ST board, please ask the question here in this thread.

 

1. Please download a new Build Environment for your ST board and create a folder under ‘<Board Name>/Application/Project’ and rename it to ‘STM32CubeIDE’.

 

2. Copy the folder ‘<Board Name>’ from ‘<Board Name>/Application/Project/TrueSTUDIO’ into ‘<Board Name>/Application/Project/STM32CubeIDE’.

 

3. Go into ‘<Board Name>/Application/Project/STM32CubeIDE’ and delete ‘TrueSTUDIO_ew_post_process.cmd’ and ‘TrueSTUDIO_ew_post_process_power_shell_script.ps1’. The post process that mentioned in the Getting started articles is not able to use with STM32CubeIDE. That what this post process does, is also easy to set up manually. How that works is descripted later in this thread.

 

4. Now open your STM32CubeIDE v1.0.0 and select the created folder as workspace.

 

5. Then start the import function located under ‘File->Import’.

 

6. Nevertheless that the import function will effect that the project cannot build, please select ‘Import Atollic TrueSTUDIO Project’ and press ‘Next’.

 

7. Select ‘<Board Name>/Application/Project/STM32CubeIDE/<Board Name>’ with the ’Directory…‘ function and press ‘Finish’.

 

8. Press ‘OK’.

 

9. STM32CubeIDE needs to know exactly the MCU that is mounted on your board. Therefore please use the related product reference that can be found on ST’s homepage. Normally you have to select just one MCU. Please ensure that this selection is correct, otherwise the project could build correctly but the flash process will not do what it should. If this is done, then press ‘OK’.

 

10. Press ‘OK’.

 

11. Press ‘OK’ again.

12. And press it ‘OK’ again.

13. If you try to build the project with ‘Build->Build Project’ you will get this error. This means that the Embedded Wizard automatically generated code is not present.

 

14. That’s easy to solve. Just go into any example like ‘<Board Name>/Examples/HelloWorld’ and generate the UI code with Embedded Wizard Studio (3.).

 

15. Please refresh the project explorer by pressing ‘Right click on the project->Refresh’.

 

16. Then go into the project properties by pressing ‘Right click on the project->Properties’.

 

17. Switch to the ‘Include’ tab that is located under ‘C/C++ General->Paths and Symbols->Includes’. And here you can see why the project cannot build correctly. The import function changes the paths that we have defined in ‘Includes’ and ‘Library Paths’. On the left side the paths after the import in STM32CubeIDE are shown and on the right side how it looks within Atollic TrueSTUDIO.

 

18. So, use the ‘Edit…’ button to correct the paths, therefore replace ‘../../’ with ‘${ProjDirPath}/../../../../’.

 

19. Do the same as in step before with the ‘Library Paths’ any press ‘Apply and Close’.

 

20. Press ‘Yes’.

 

21. If this is done, normally the project should build as usual with ‘Build->Build Project’. To do a project refresh (step 15) before, is never wrong.

 

22. The new STM32CubeIDE has a really smart flash tool integrated that allows you to setup the flash process with just a few step. Thus, start by pressing the ‘Bug button->Debug As->2 STM32 MCU C/C++ Application’.

 

23. In the window that then will appear, switch to the ‘Debugger’ tab.

 

24. Depending on the selected ST board, it could be necessary to activate the ‘External Loader’ by selecting the check box. Per default the flash loader selection beside the checkbox is empty. By pressing ‘Scan’ STM32CubeIDE searches for available external flash loaders within its file location.

 

Attention: Step 24 and 25 is only necessary if you use an external flash. Not all ST boards that we support do have an external flash mounted on it. To get know whether an external flash is supported, you can check the ‘Symbol Tab’ in the same menu as explained in step 15. If there is a define named with ‘EW_USE_EXTERNAL_FLASH’ then your board has one. If not, please skip the step the flash loader selection.

 

25. Otherwise please select the flash loader for your board. This information you easily can find in ‘<Board Name>/StartGccBuildEnvironment.bat’ behind the variable ‘ExternalLoader’. This batch file you can open with any text editor. Anyway, select the correct flash loader and press ‘Debug’. Ideal wise the application should start to flash know.

 

26. (Optional) To repeat the flash process without opening the dialogue you can use the ‘Launch history’ entry by pressing the ‘Bug button’. This selection will appear after you have flashed the board the first time like in step 25.

 

27. Press ‘No’ … or ‘Switch’, whatever you prefer after the flash process is finished.

 

28. As last step you have to start the application by pressing the ‘Play’ button. Please ensure before that the flash process was successfully.

 

29. Now you should be able to build, flash and debug your Embedded Wizard application with the new STM32CubeIDE.

 

Hopefully this guide will help all STM32CubeIDE user until we will support this IDE with a predefined project.

Please also note that we do not guarantee for any correctness due to the reasons that STM32CubeIDE is not a part of our test process at the moment.

Best regards

Tim Zierer

by
Many many thanks for this high quality tutorial.

Unfortunately, it seems not to work with STM32F429-Discovery build environment. There is no step 9 in that case but I guess it's not mandatory as conversion process don't find any ambiguous target.
The main issue concern step 13 in which nothing happens when building project, even after building Generated Code from EW I'm not able to build.

Moreover, the CubeMX file (.ioc) is missing so I can't adjust controller features/pins/clock/etc.

I'm used to arduino but I'm a pure beginner with stm32 so please accept my apologies if my questions are trivial.
0 votes
by

Hi again!

 

as already mentioned in step 3, I would like to explain what the post process normally does and how you can replace them by changing the relating IDE settings manually.

 

Our Free Version and Small Business Build Environments containing precompiled libraries. These libraries are available for different color formats and screen orientations. Depending on the example application that you want to run, you have to change these settings.

 

But this is just necessary for the examples named ‘ColorFormats’ and ‘ScreenOrientation’ located in ‘<Board Name>/Examples’.

 

For all other examples normally you do not have to change that, cause the predefined settings are working for the most examples.

 

To control the color format and screen orientation, all projects do contain the symbols

‘EW_FRAME_BUFFER_COLOR_FORMAT’ and ‘EW_SURFACE_ROTATION’. Depending on the selected profile in the Embedded Wizard Studio project, it would be necessary to change these setting. How the ‘Symbols’, ‘Libraries’ and ‘Library Paths’ should look like, you can see in following pictures.

 

Example ‘ColorFormats’ with ‘RGB565’ as selected profile only:

This are the default settings!

 

Example ‘ColorFormats’ with ‘Index8’ as selected profile only:

 

Example ‘ColorFormats’ with ‘LumA44’ as selected profile only:

 

Example ‘ColorFormats’ with ‘RGB888’ as selected profile only:

 

Example ‘ColorFormats’ with ‘RGBA4444’ as selected profile only:

 

Example ‘ColorFormats’ with ‘RGBA8888’ as selected profile only:

 

Example ‘ScreenOrientation’ with ‘STM32_0’ as selected profile only:

This are the default settings!

 

Example ‘ScreenOrientation’ with ‘STM32_90’ as selected profile only:

 

Example ‘ScreenOrientation’ with ‘STM32_180’ as selected profile only:

 

Example ‘ScreenOrientation’ with ‘STM32_270’ as selected profile only:

Clearly the screen orientation and color format also can be changed both at the same time within a project. This post is just related to our UI examples only, and there these technical feature are separated.

 

One last thing to do when you like to use the ‘Color Formats’ example. STM32CubeIDE (and TrueSTUDIO) can exclude resource folder from the current build process. As you probably see, this is already done cause only the ‘RGB565’ folder appears in black. All other are exclude which is indicated by the symbol and the grey text color. Depending on the color format, you have to set up with the excluding function your project. Please care, that only one active color format folder is permit to include in the current build process.

 

With ‘Right click on the folder that you want to exclude/include->Resource Configurations->Exclude from Build’ you’re able to exclude folders. The same is shown in following picture:

 

Best regards


Tim

Embedded Wizard Website | Privacy Policy | Imprint

...