cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5G9J-DK2 : error compilation with nema_hal.c

davidzuercher
Associate II

Hello,

I have :

STM32U5G9J-DK2

Windows 10

STM32CubeIDE 1.7.0

TouchGFX 4.23.0 installed in STM32CubeIDE  with helps/manage embedded software package

TouchGFX designer 4.23.0

 

Sometimes when I generate the code from the .ioc, after having made a modification in the configuration,

compilation errors appears with the files

nema_hal.c

TouchGFXConfiguration.cpp

located in Application/User/TouchGFX/target/generated

It seems to be a problem with GPU2D.

After the first generation of the files with Designer, it does work without any problem.

I can make some modifications in the .ioc and generate the code but after a while

I have compilations errors, always with those 2 files, even if I have only add a GPIO_Output.

I have tried some things like regenerate code in Designer and STM32CubeIDE,

delete some directories and regenerate code in Designer and STM32CubeIDE, but

impossible to repair those errors.

Is this a known issue ?

I have searched on the forum but nobody seems to have the same problem than me.

 

Thank you

Kind regards

David

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello Osman,

I don't understand where I have to check the presence of the line. I can't find a file named .touchgfx.

I have had some times this problem but when I copy the directory ...\Middlewares\ST\touchgfx_components

of another project, it works again.

 

 

 

View solution in original post

8 REPLIES 8
Osman SOYKURT
ST Employee

Hello @davidzuercher ,

Did you start your project from one of the STM32U5G9J-DK2 TBS we provide on TouchGFX Designer, or was it through STM32CubeIDE (or STM32CubeMX)?
Also, could you try with TouchGFX 4.23.1 version and tell me if it's the same?
When I have this issue, I try to right-click on my project on STM32CubeIDE and "clean project", it helps sometimes.

OsmanSOYKURT_0-1708007351725.png

Osman SOYKURT
ST Software Developer | TouchGFX
davidzuercher
Associate II

Hello Osman,

I have desinstalled TouchGFX 4.23.0, installed TouchGFX 4.23.1, made a new project with Designer 4.23.1 and exactly the same problem came again.

I think I have found the reason of those errors.

When I regenerate the code with CubeIDE from the .ioc file, after having modified the configuration (added a GPIO_Output), the directory [directoryname]\[applicationname]\Middlewares\ST\touchgfx_components    of my project is erased.

I have done a new project with Designer, I have copied the directory ...\Middlewares\ST\touchgfx_components

of this new project in ...\Middlewares\ST\ of my project with errors and now I can compile it and load in my board.

I hope the directory ...\Middlewares\ST\touchgfx_components is always the same, whatever the content of the project...

At first sight it works, but I have to do more test to be sure that it is really a working solution.

Thank you

Kind regards

David

 

Hello @davidzuercher ,

We'll try to investigate this issue. It's not supposed to be deleted after regenerating code from the ioc.
Also, tgfx should copy the touchgfx_component folder (from your Touchgfx installation path) into the project.

Could you check if in your .touchgfx file you have this line?
"OptionalComponentsRoot": "../Middlewares/ST/touchgfx_components"

If not, could you add it manually and tell me if it helps?

Osman SOYKURT
ST Software Developer | TouchGFX

Hello @davidzuercher ,

Did you try what I suggested in my last message?

" Could you check if in your .touchgfx file you have this line?
"OptionalComponentsRoot": "../Middlewares/ST/touchgfx_components"

If not, could you add it manually and tell me if it helps? "

We would very much like your feedback so we can help you and everyone who faces the same issue.

Osman SOYKURT
ST Software Developer | TouchGFX

Hello Osman,

I don't understand where I have to check the presence of the line. I can't find a file named .touchgfx.

I have had some times this problem but when I copy the directory ...\Middlewares\ST\touchgfx_components

of another project, it works again.

 

 

 

Hello @davidzuercher ,

The .touchghfx file is your TouchGFX project file which is generated when you create a project.

OsmanSOYKURT_1-1710759255294.png

If you open it with a text editor, you should have the "OptionalComponentsRoot" line :

OsmanSOYKURT_2-1710759356441.png

Could you check that?

Also, could you try generate code not from STM32CubeIDE but STM32CubeMX instead (and generate code on TouchGFX Designer afterwards)? 

 

OsmanSOYKURT_4-1710759824761.png

Osman SOYKURT
ST Software Developer | TouchGFX

Hello Osman,

Yes I have this line near the end of the file :

"OptionalComponentsRoot": "../Middlewares/ST/touchgfx_components" (copy-paste from my file opened with the text editor)

In attachement my project file saved with the text editor with .txt extension

Osman SOYKURT
ST Employee

Hello @davidzuercher ,

Ok, thank you for your help, we are investigating this issue and why this folder is not copied when you generate code from TouchGFX. Meanwhile, your workaround is the best to do. I invite you can select your answer as "Solution"  It would help everybody who's facing the same issue to find the workaround until we fix it.
Thanks again.
Regards,

Osman SOYKURT
ST Software Developer | TouchGFX