Skip to main content
TakenTheBacon
Associate III
Feb 16, 2023 4:17 PM UTC
Question

Generate code from .ioc removes TouchGfx files

Hello,

TouchGfx v4.17.0

CubeIDE v1.11.2

I am using the .ioc UI to add an analogue pin for use with GUI, but when I save and generate code, it removes several TouchGfx files making code uncompilable, am I missing something in TouchGfx set up from CubeIDE?

TouchGfx itself generates code fine into CubeIDE and the deployment to board is also fine, I suspect there is just some buried option I am missing hopefully. Re-generating code from TouchGfx Designer doesn't repair missing files

Thanks

This topic has been closed for replies.

10 replies

Yoann KLEIN
ST Employee
Feb 17, 2023 8:51 AM UTC

Hello @TakenTheBacon​,

Which files are removed exactly ?

Did you start your project from TouchGFXDesigner or from CubeMX ?

Also, the TouchGFX version you are using seems a bit old and might not work well with this version of CubeIDE, could you please try to migrate your project to a more recent version, e.g. 4.21.1 ?

Thanks

/Yoann

Yoann KLEINST Software Developer | TouchGFX
TakenTheBacon
Associate III
Feb 17, 2023 2:15 PM UTC

Hello,

Files removed are:

TouchGfx\target\ entire folder,

TouchGfx\App\app_touchgfx.c and h

I can't migrate to 4.21.1 because it causes several more errors and missing folders,

Thanks

Yoann KLEIN
ST Employee
Feb 17, 2023 2:29 PM UTC

Are you using TouchGFX Generator inside CubeMX ?

0693W00000aH6LSQA0.png 

/Yoann

Yoann KLEINST Software Developer | TouchGFX
TakenTheBacon
Associate III
Feb 20, 2023 8:59 AM UTC

Hi Yoann,

Yes I have the software package installed for 4.17, have tried things a few times now and still same errors. Undoing the deletion via GitHub, and refreshing everything, will then produce a further errors such as 'STM32DMA.hpp no such file or directory' even though the header file is available again in the same directory :(

In fact, reverting my pin change and re-generating the build that works also causes similar inclusion errors.. maybe there is something else in a set up I have missed compared to my co-worker? I would not know how to track it down

Yoann KLEIN
ST Employee
Feb 20, 2023 10:35 AM UTC

Hello,

That is really weird, those files are in fact generated by X-CUBE-TouchGFX when you press the generate code button in CubeMX.

What if you start a new project from scratch, reproduce the same configuration in CubeMX, press generate code, open TouchGFXDesigner and press generate code also, then try to compile the project ?

/Yoann

Yoann KLEINST Software Developer | TouchGFX
TakenTheBacon
Associate III
Feb 20, 2023 4:47 PM UTC

Hi Yoann,

Wondering if 'Generate Under Root' option is probable cause? It is selected in my Project Manager tab, but all options are greyed out and unchangeable, including Project name, toolchain etc

Yoann KLEIN
ST Employee
Feb 21, 2023 12:46 PM UTC

Generating under root should always be disabled. Is that the case in your project of is it checked ?

Yoann KLEINST Software Developer | TouchGFX
TakenTheBacon
Associate III
Feb 21, 2023 2:03 PM UTC

It is checked and most of the options in Project Manager are greyed out stopping me from editing. This may be the source of the issue.. project is inherited from a colleague (hence not updating TouchGfx version for collab). No issues changing user code or GUI and building/deploying.. not sure what may be causing greyed out options?

Tried process on another PC, reach same include errors after generate

TakenTheBacon
Associate III
Feb 22, 2023 9:00 AM UTC

I'm not too sure.. I've managed to narrow down the issue to just 1 error today, 'STM32DMA.hpp: No such file or directory' even though the header file is still available. My other files are generally untouched when generating