Incorporating native code

asked Feb 21 in System Integration by ezed413
I will be implementing the SPI and UART periherals of the STM32F746. Should I put all of the code in the device driver. I'll be using STM32CubeMX to generate the code and paste it into a file. Is there a more elegant way instead of copying and pasting code. What are others using to manage the code and for project management? Thanks in advance.

1 Answer

0 votes
answered Feb 22 by Tim Zierer

Hi there,


regarding to your question about where to place SPI and UART code; Actually the UART and SPI code doesn’t is a part of the Embedded Wizard GUI framework, so we do not recommend it to place it into the device driver part. This part is dedicated for user code which directly sends or fetches data from and to the GUI. For example, within the Build Environment for STM32F746 you can see that the UART API is configured in ‘ew_bsp_serial.c/.h’ which is appart of the target specific (BSP) code.

Regarding to your question about STM32CubeMX; At the moment we do not officially support STM32CubeMX. Anyway a few months ago I had prepared a STM32CubeMX project for the use with Embedded Wizard, you can download that project here

Within the folder “CubeMX_with_EmbeddedWizard” you can find the .ioc file for CubeMX and a TrueSTUDIO project. The STMCubeMX project configures the minimum hardware requirements, that are necessary for Embedded Wizard. Within CubeMX you can press the “Generate Code” and this will update/regenerate the source code, except the user defined parts. Within the “USER CODE BEGIN/END” parts is the code added, which Embedded Wizard needs. With this STM32CubeMX project you can add other software parts as ever you want.

When you press “Generate Code” probably a will warning appear, just press “Yes”, FreeRTOS will work anyway.

This project isn't an official release from our side, thus it looks slightly different as one of our Build Environments.

The STM32CubeMX project was tested with:


*Embedded Wizard 9.30 Free Version (with Watermark and Libraries)

*STM32CubeMX 5.5.0

*Atollic TrueSTUDIO 9.3.0

*STM32Cube_FW_F7_V1.15.0 (within CubeMX)


Hopefully this will help you to start your own project.





commented Mar 19 by ezed413
When I use the st-link utility to program the board, I get the following:

09:51:30 : No elf loader found for this operation.
commented Mar 19 by ezed413
I fixed it, I had to add an external loader to the st-link utility. Now I have to figure out why I can't do it from TrueSTUDIO.
commented Mar 19 by Manfred Schweyer
Does the application run correctly after flashing it via ST-LINK utility?
commented Mar 19 by ezed413
Oops, I didn't have the right loader set in TrueSTUDIO! It's working.

Question: Should I continue to use TrueSTUDIO, or should I switch to STM32CubeIDE?

Thanks for helping me find this issue. It was driving me crazy!
commented Mar 19 by ezed413
Yes it does! Thanks very much for the help.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint