2023-07-08 02:26 PM
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
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.
Anyone have any ideas on what the issue might be?
2023-07-08 10:17 PM - edited 2023-07-08 10:18 PM
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 ?
Here you can see unambiguously how paths are.
Br J.T
2023-07-09 10:22 AM
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.
2023-07-09 10:45 AM - edited 2023-07-09 11:35 AM
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.
2023-07-09 12:26 PM
Hello
I think you have allready read this
and some next chapters ? And this:
Are you working with some custom board ?
Br J.T
2023-07-09 01:19 PM - edited 2023-07-09 01:28 PM
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.
2023-07-09 10:47 PM
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 :thumbs_up:
Br J.T
2023-09-05 01:07 PM
I'm having the same problem. Sequence of events:
2023-12-13 12:46 PM
I am also having a similar issue. Has anyone resolved the issue yet?
2024-10-23 06:53 PM
Having the same issue. Has anyone resolved it yet?