SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world.
And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download two short videos (registration required) highlighting:

System Workbench for STM32

STemWin and AC6 for STM32F429-Disco


I’m trying to use the pre-compiled version of STemWin that ST supplies with their STD and HAL Libraries. First, I spent two days to get the linker to find the .a lib file. I have read at many places that you have to use the library name without the prefix “lib” or suffix “.a”, but that did not help either. I had to rename the lib file itself with the lib prefix and .a suffix so the linker can see it.

Now, everything compiles, however, as I call GUI_Init(); from main, I get a lot of errors during compilation about undefined reference or something for certain functiond for the STemWin. GUI.h was included, too!

I tried this with the STd Periph Lib and HAL from ST, but still couldn’t figure it out!

Any advice?



About the way to link a library through Eclipse, indeed:
- The library name should be prefixed by “lib” with the “.a suffix (like “libSTemWin522_CM4_OS_GCC.a”)
- The Library should be linked through the project properties (C/C++ General > Paths and Symbols > Libraries). There you need to call the lib but without the prefix and suffix (just “STemWin522_CM4_OS_GCC” in our example).
The library path has to be provided through the “Library Paths” tab.

Can you tell us more about your errors (especially the first ones that are referenced through the console).
Did you add correctly all the include files? You still need to provide the EmWin header files (and there are a lot of them, not only the GUI.h file). And if they are placed in a specific “include” folder (not the provide “inc” subfolder of your project), you will have to add this path to the project properties ( C/C++ General > Paths and Symbols > Includes > GNU C ).


Couette Christophe

Hello Couette,

Thank you for your reply. Yes, of course, I did follow all the steps as you mentioned. I have linked the library from the Project Properties (C/C++ General > Paths and Symbols > Libraries) exactly as stated, without the lib and .a prefix/suffix. Also, I have provided the path for the library, which is the workspace in my case.

For any new include file/folder, I used to add the path right before doing anything further. I never had a problem getting the compiler to find a hearder file.

I have maintained the file structure for STemWin, as suggested in the manual. The inc folder has all the header files required by STemWin. Config folder has other headers, too. Their paths added to the include paths at project settings, too.

According to project examples for STemWin, they’ve only included the GUI.h in the main. Do I have to include something else?

I will create the project again and send the errors.

Thanks again!


Find attached a project that you can import to your SW workspace (File > Import > Existing Projects into workspace) and that build without error.
Be sure that your SW IDE is up to date. You need to import the stm32f429i-disco_hal_lib project too (or to be sure that yours is built with the hard float options activated).

I hope it will help.
Let me know if something goes wrong.



Couette Christophe


where can I find some documentation or any other material that explains how all the process works? The steps you mentioned, the include folders, etc? I’m tottaly confused about it. I’d like to study it from the basics to have a good understanding of what’s going on, because right now, I’m uncapable even to start doing it (everything involving the process and steps to include and use a library in a project).

Thanks a lot.

Vítor Pereira

Hello Couette,

Thank you very much for the attached project. I’ve been away the couple past days. Anyways, I have just downloaded the attached project and will give it a try shortly. However, I noticed that it was built around the HAL Lib of ST. I was wondering if you can provide similar project that compiles without an issue with AC6, and based on the Std.Periph.Lib. You know, I spent a considerable time trying to get familiar with the Std Periph Lib, and after a lot of frustration with HAL, I deicded to switch back to the library that I’m much acquainted and comfortable with, which is the Std.Periph.Lib. I’ve got the last version from ST (1.5).

My AC6 IDE is up to date.

Thank you again for your follow up!

Hello again,

This is from another project, before I give a try to your attached project.

‘Building target: STM32F4_dSPIN.elf’
‘Invoking: MCU G++ Linker’
arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -L”C:\Users\Admin\STM32_WS\STM32F4_dSPIN\STemWin\inc” -T”C:\Users\Admin\STM32_WS\STM32F4_dSPIN\LinkerScript.ld” -Wl,-Map=output.map -Wl,--gc-sections -fno-exceptions -fno-rtti -o “STM32F4_dSPIN.elf” @”objects.list” -lSTemWin522_CM4_GCC
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.1.0.201503101257/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: error: STM32F4_dSPIN.elf uses VFP register arguments, ./src/delay.o does not

Does not what?

This is only when I link against the the STemWin Library. Of course, not only this error, but several dozen of similar error! (VFP register arguments)

I’m going to test your project now!

Thank you

Hello Couette,

Your project compiles successfully without any issue. I’m now enjoying the demo on my STM32F429-Discovery Board. I noticed that the HAL library name and path were added alongside STemWin on project settings >Linker. Perhaps because of the many issues I faced with a previous template built around HAL, I could not proceed with building STemWin.

Now, I can use this project as a reference template, however, the rest of my program code was designed to work with the STD. Periph. Lib, which I still can’t replace with the new HAL.

It would be very helpful if you can send a similar template project for STemWin built with the Std. Periph. Lib.

Thank you again for your excellent follow up!

Hello again,

I have removed the entire project from my workspace and started a new one from scratch. It is still based on the Std.Libs from ST. I do not have a problem with the linker finding my lib.a anymore, and everything compiles without an issue. However, when I start initializing emWin, the linker complains about an issue with RAM or apparently the stack/heap size.

arm-none-eabi/bin/ld.exe: STM32F4_dSPIN.elf section `.bss’ will not fit in region `RAM’
arm-none-eabi/bin/ld.exe: region `RAM’ overflowed by 343004 bytes

I have read through plenty of others’ threads across many forums who had the same issue, but still could not figure it out.

I have attached my LinkerScript file if you want to take a look!

Thank you again!

Look in GUIConf.c for a macro GUI_NUMBYTES which STemWin uses to allocate a memory pool. Default is pretty large and you may be able to reduce that to fit in .bss (if that is the source of the problem.)

Awesome, it has worked and the program compiles now without an issue! The default has used a value that is very huge in comparison with the internal SRAM and stack size. I defined it like this:

  1. define GUI_NUMBYTES (181284)

And it worked!

Thank you for your help!


Do I import both projects (Project_EmWin_STM32F429_Disco, stm32f429i-disco_hal_lib) and do Project ---> Build All?
(Or are there additionaly steps needed?)

I ran into ‘Launching STM32F429I-Discovery.elf’ has encounterd a problem.
‘’An internal error occurred during: “Launching STM32F429I-Discovery.elf”.

Any ideas?




I noticed that the project had compiled correctly (bin file generated in Debug folder).
I was able to program the board using ST-LINK Utility and the .bin file.

Looks like the problem I ran into is eclipse/AC6 IDE related.

Best regards,



Hello Manny,

I think your problem is related to a misdefinition of the board.
@see: properties > C/C++ Build > Settings > Target
then fix the Board combobox value; select STM32F429I-DISCO (or STM32F429I-DISC1, it depends on your board)


Hello Manny.

I had the same problem. I get resolved it.

1) Import project and Build All.

2) To run use Debug -> Debug as -> Ac6 STM32 C/C++ Application

After first time you use Debug, you can Run normally.


Subtitle: Copy of the example into own projects.

Thanks for this thread and the example of HAL, EmWin and Disco429.

I want to use the example in an own project. I have copied it in separate folders , changed the name of the project and modified the path names in the project files.

But with no success: The disco_hal_lib copiled OK, but in my project, it could not find the GUI.h.
What would be the easiest way (newcomer) to use the example for own projects?

Many thanks for you hints


Many thanks for your numerous hints. But in the meanwhile, I found the solution by myself:
In addition to the a.m. actions, I have renamed the two projects within Eclipse and modified the pathnames in the property section, e.g. the inc and linker sections.

Now it works well.