cancel
Showing results for 
Search instead for 
Did you mean: 

Regenerate code with TouchGFXDesigner

JVALL.1
Associate III

I am trying to get familiar with the workflow for using TouchGFXDesigner with CubeIDE, when I create a project with the designer and import it to the CubeIDE all works fine, but for example I change the name of a screen in the designer and regenerate the code, then the CubeIDE project still reflects the old name for the screen and does not compile anymore.

Is there a way to regenerate all files so that the project in the IDE is correctly updated?

5 REPLIES 5
Yoann KLEIN
ST Employee

Hello @JVALL.1​ ,

Did you try to press "Refresh" in CubeIDE?

That should update information about your project.

0693W00000QLjTOQA1.png 

Let me know if that resolved your issue.

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX

When you mentioned if I refreshed the project I thought I already did so I did some more testing and got what I think is some strange behavior, maybe you can give some clarity, here are the steps I am taking.

Using IDE 1.10.1 and Designer 4.20

  1. Create a project with the designer, default project with no modifications and generate the code.
  2. Import to CubeIDE with "Projects from Folder or Archive" selecting the top directory from the Designer project, then I have the project with the CubeIDE project nested inside.
  3. Build first time and works fine.
  4. In Designer modify the name of Screen1 to MainScreen and generate the code
  5. Then build with the IDE without refreshing, the project is updated with the new file names and builds fine.
  6. In Designer modify the name of MainScreen to LogoScreen and generate the code
  7. In the IDE refresh the top project before building
  8. Then when I build the files are not updated with the new names and doesn't build anymore,

0693W00000QLsBiQAL.png 

At this point I have not been able to update the project correctly anymore.

Should I import the projects into the IDE using a different approach?

Also noticed that it's not possible to have two projects for the same board at the same time in the IDE, is this maybe related to the Designer always using the name of the board for the project name?

Hello,

Did you previously generate code for the correct Toolchain in STM32CubeMX ?

If not, open your .ioc file in CubeMX, go to the "Project Manager" tab. Then select STM32CubeIDE in "Toolchain / IDE" option box and press Generate code.

For the project importation, you could also simply double click on the .project file inside the STM32CubeIDE folder. Please try that to see if there is a difference between the two ways of opening a project.

And yes, in CubeIDE, you cannot open two project with the same name in the same workspace, so you either have to open a new workspace or delete the previous project.

Hope that this helps,

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX

Hi,

Tried opening the .ioc file using the CubeMX pluguin of the CubeIDE, in the "Project Manager" tab the option for the toolchain has already selected STM32CubeIDE, but it's grayed out and it's not possible to modify it, regenerating the code from CubeMX does not fix the problem and still appear errors when building.

Importing the project using the .project file imports only the the nested project in STM32CubeIDE folder, this way is not possible to reproduce the same error because the top GFXDesigner folder is not imported, so everything seems to work correctly, when a change is made in the designer gets updated correctly in the IDE.

With this method though, there are some minor inconveniences, you can no longer open the designer project from within the IDE nor the VisualStudio studio project for the simulator.

Even with that, seems this is a better way to import the project into the IDE.

Hello,

That's the normal behavior of a project. In STM32CubeMX, you will only be able to select your toolchain, modifying your parameters/configuration, but not opening the .ioc file. When you will click "Generate code" in CubeMX, all the files related on the configuration you chose will be created or modified in your project.

I would recommend you to open your CubeIDE project by clicking on the .project file and, instead of importing it directly from CubeIDE. If you wanna do modifications in the UI of your application, simply use TouchGFXDesigner and regenerate code.

Like you said, all the changes will be updated in your CubeIDE project.

If you want to access the files generated by the designer, they are located in Application>User>TouchGFX>target>generated. You can also access and modify stuff in your Model, Presenter or Screens : these files are located in Application>User>gui.

Let me know if you have other questions ;)

Yoann

Yoann KLEIN
ST Software Developer | TouchGFX