cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify STM32Cube Project in TouchGFX

JMuller
Associate II

Hey,

i use the STM32H757-EVAL Board and was already able to create a new project in TouchGFX (4.20.0), import it to STM32CubeIDE (1.10.1) and modify GUI and Hardware functionality.

In order to have more flexibility and to setup a more clean project, i wanted to create the initial project in the CubeIDE, add the TouchGFX Software Pack and only then start using the TouchGFX Designer for GUI creation.

My problem is now, that after generating the CubeIDE project and importing the "ApplicationTemplate.touchgfx.part" file in the designer, the code generation always fails.

The logfile says, that the post Generate Target is unable to locate the /.cproject file.

The file is located in the "Project_name/CM7" folder.

Modifying the Build setting of the "Post Generate Target Command" to the specific file location didn't help unfortunately.

Maybe someone here has also encountered this little problem before.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
JMuller
Associate II

Ok i got the solution, at least kind of..

To your suggestion: i tried different commands with absolute and relative filepaths but none of them worked.

BUT: i found this 10 months old community question where the user seemed to have the same problem:

https://community.st.com/s/question/0D53W000017OpinSAC/why-the-cubeide-cant-generate-an-stm32h747-based-project-and-why-cant-generate-the-touchgfx-also-the-gui-stm32cubeide-170-touchgfx-4017

And it looks like the mentioned solution is still the way to go.

So i downloaded STM32CubeMX, set up a fresh project with the "Generate under Root" checkbox unchecked --> added the TouchGFX Software pack --> Generated the code --> opened the project in TouchGFX Designer and generated code --> imported the Project to STM32CubeIDE and there it was finally working.

Would be really great to have the ability in STM32CubeIDE to leave the "Generate under Root" checkbox unchecked in a future release.

But thanks for your help!

View solution in original post

4 REPLIES 4
MM..1
Chief III

4.20 exist some weeks, if this is new bug ... But maybe your project is in long or space special chars folder. Check and place your projects to top folders without spaces or special chars.

JMuller
Associate II

Thanks for the answer.

I tried to keep it as simple as possible by working on a dedicated USB drive.

So my project structure looks like:

  • D:\Project_name
    • \CM4
      • \.cproject
      • \.project
      • \Core, etc..
    • \CM7
      • \.cproject
      • \.project
      • \Core, etc..
    • \Common
    • \Middlewares
    • \Drivers
    • \.project
    • \Project_name.ioc

I found out, that by manually putting the CM7 .cproject file in the main folder next to "project_name.ioc", the TouchGFX designer can find it and modify it.

But after copying it back in the CM7 folder, the CubeIDE won't build the code because of linker errors. probably because now wrong filepaths have been added to the project file.

There must be some easier way to fix this instead of manually modifying the includepaths in the project file.

dont move files try edit

0693W00000QNrjYQAT.png

JMuller
Associate II

Ok i got the solution, at least kind of..

To your suggestion: i tried different commands with absolute and relative filepaths but none of them worked.

BUT: i found this 10 months old community question where the user seemed to have the same problem:

https://community.st.com/s/question/0D53W000017OpinSAC/why-the-cubeide-cant-generate-an-stm32h747-based-project-and-why-cant-generate-the-touchgfx-also-the-gui-stm32cubeide-170-touchgfx-4017

And it looks like the mentioned solution is still the way to go.

So i downloaded STM32CubeMX, set up a fresh project with the "Generate under Root" checkbox unchecked --> added the TouchGFX Software pack --> Generated the code --> opened the project in TouchGFX Designer and generated code --> imported the Project to STM32CubeIDE and there it was finally working.

Would be really great to have the ability in STM32CubeIDE to leave the "Generate under Root" checkbox unchecked in a future release.

But thanks for your help!