cancel
Showing results for 
Search instead for 
Did you mean: 

Many "fatal error...no such file or directory" errors when compiling cubeMX generated TouchGFX code

Conner1
Associate II

I'm trying to work with touchGFX, but I'm struggling to get it to compile.

I downloaded the latest version of cubeMX as of today, 7/8/2023, then started a brand new project for an STM32F446VET

I enabled X-CUBE-TOUCHGFX version 4.21.4, enabled the CRC, and set the clock to 180Mhz. I then imported the project into CubeIDE as an existing STM32CubeMX configuration file. I went into touchGFX, created a blank display, ran the simulator, closed it, then tried to compile the code and I'm hit with many "no such file or directory" errors. The directories do exist, I can see them in the file explorer

Directory clearly exists.PNG

 If I edit the offending include to point directly to the file in question, the error does seem to go away but I'm hit with about 30 more, different but similar, errors, I attempted to go into properties -> Paths and Symbols and adding in every combination of the directory I could think of but that made no difference.

More errors.PNG

 Anyone have any ideas on what the issue might be?

8 REPLIES 8
JTP1
Lead

Hello

Few things come to my mind.

You seem to have EWARM- folder, did you remember to change Tool chain to STM32CubeIDE from CubeMX - project manager - Project page ?

After generating the code from CubeMX, did you then open the 'ApplicationTemplate.touchgfx.part' file from TouchGFX-folder to TGFX designer ?

Did you set your paths to both GCC and G++ compilers ?

JTP1_0-1688878547581.png

Here you can see unambiguously how paths are.

Br J.T

Thanks for the response! I ended up fixing the issue by changing the "Targeted Language" from C to C++ in the new project menu. Afterwards, once I opened the 'ApplicationTemplate.touchfx.part' file, and ran through touchGFX to the point where I could run a blank simulation, I'm able to compile without issues.

For what it's worth, I peaked at the Tool Chain and it was set to STM32CubeIDE for the original projects I couldn't compile, and I had opened the touchGFX file and still had the issue.

I spoke too soon

I've found that whether I set the targeted language as C or C++ didn't actually make a difference. If I try to compile the project before making any changes to the TouchGFX settings, like changing the resolution or frame buffer strategy, then go into touchGFX and generate the code it will compile, but as soon as I make any single change it will no longer compile even if I change the settings back. This also appears to be true if I manually make a change to one of the offended .cpp or .hpp files.

Conner1
Associate II

I had not yet read those.

I disabled Generate Under Root as per the first guide

I verified all necessary Include Paths were present for both the MCU GCC and G++ compiler's, except for /TouchGFX/platform/os as that directory is nowhere to be found.

I verified all the necessary compiler switches are present for the GCC compiler, but not the G++ compiler. I attempted to add them into the GCC compiler under  Miscellaneous -> Other Flags and that made no changes.

The core library path is present in the linker options. However, many of the suggested options were missing. I attempted to add them in under MCU G++ Linker -> Miscellaneous -> other flags and that made no changes.

 

I am using a custom board

 

Edit: I'm not sure what specifically I changed, but it seems like it's not currently struggling to find files that are there but is definitely struggling to find files that aren't there. There is no touchgfx/hal directory but it's looking for one.Capture.PNG

Hello

Some of those missing files should be under /middlewares/st/touchgx/framework/include but it seems to be missing in your project.  What you have under stm32cubeide folder ?

What is your display type and how it is connected? It might be good idea to check some discovery/nucleo board projects started from tgfx designer template. Any case you must adapt the driver for your display and touch ic manually or copy from somewhere.

If you share your project, maybe somebody could check what is wrong with it 👍

Br J.T

Kel
Associate

I'm having the same problem. Sequence of events:

  • Create a cubemx project
  • generate code within cubemx
  • open the .part file in touchGFX designer
  • make a simple UI
  • generate code within touchGFX designer
  •  hit compile within stm32cubeide
  • Get numerous "No such file or directory" errors. The files all exist and can be found using windows search.
  • Start playing wack-a-mole, adding include directories to the project. This eliminates some of the errors but not all
  • Notice that not all the include directories are shown in the compilation command preceding the error.
IHarg.1
Associate III

I am also having a similar issue. Has anyone resolved the issue yet?