Skip to main content
Associate
July 22, 2026
Question

Still faulty: Duplicit include paths are added to Keil project when TouchGFX project is regenerated

  • July 22, 2026
  • 4 replies
  • 45 views

The problem described in https://community.st.com/stm32-mcus-touchgfx-and-gui-33/duplicit-include-paths-are-added-to-keil-project-when-touchgfx-project-is-regenerated-151799 ist still there. The topic was closed a year ago and it seems that nothing happened since then.

Please provide a solution!

4 replies

Andrew Neil
Super User
July 22, 2026

The topic was closed a year ago and it seems that nothing happened since then

The last post there is a request for further details, noting that ST could not reproduce the issue.

The OP, ​@Bubbly_Bee, never responded.

So perhaps you can provide those details?

 

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Bubbly_Bee
Associate
July 22, 2026

Hello,

I'm sorry I never replied. :)

Unfortunately, I can't provide any additional information on this topic. I never found a solution to the problem, and the project was stopped a few days (or weeks) after I posted my original question.

KaiRiekAuthor
Associate
July 22, 2026

Thanks for that hint. Here are my missing details:

Since i am not allowed to share my original project, i created a simple example that can be used to reproduce the error. See attached archive.

 

Toolchain:

  • CubeMX 6.17.0
  • TouchGFX Designer 4.26.1
  • Keil µVision 5.43.1

Microcontroller:

STM32U5G7VJTxQ with Trustzone enabled

In Keil µVision I added a second target for easier debugging in a non TZ environment with a ULINKpro debugger.

I guess that is the main reason why TouchGFX Designer messes up the include paths. Without this second target everything is fine. Deleting the second target again is not an option.

Reproduce the error with following steps:

  1. Check Keil µVision includes in target “DuplicateTouchGFXIncludes_NS”
  2. Open CubeMX project and generate
  3. Open TouchGFX project and generate
  4. Check Keil µVision includes in target “DuplicateTouchGFXIncludes_NS” for duplicates

When you repeat steps 3 and 4 the list of includes grows bigger and bigger.

Andrew Neil
Super User
July 22, 2026

The old post said that the Project still builds fine - is that also your experience ?

ie, this is just a “tidiness” issue ?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
KaiRiekAuthor
Associate
July 22, 2026

Sure project still builds fine. But messy include lists are error prone.

ferro
Lead
July 22, 2026

Hi ​@KaiRiek 

even though not solving the Keil project file modification by GfxDesigner, but there is option to define compiler include search paths via a file. Might help you.

Toolchain Compiler Response file option
ARM Compiler 5 armcc --via=<file>
ARM Compiler 6 armclang @<file> (Clang-style)

 

For example:

ARM Compiler 5 (AC5):

armcc --via=includes.txt
 

where includes.txt contains:

-I..\Inc
-I..\Drivers\CMSIS\Include
-I..\Drivers\HAL\Inc
-DUSE_HAL_DRIVER
 

ARM Compiler 6 (AC6):

armclang @includes.rsp

with the same contents.

The --via option is documented in the ARM Compiler 5 documentation and was commonly used to work around Windows command-line length limits. It was also supported by armlink, although there were some nuances when forwarding options between the compiler driver and linker.

In Keil µVision

If you're migrating a project from AC5 to AC6:

  • AC5: --via=myopts.txt
  • AC6: @myopts.rsp

If you had --via in the Misc Controls field, it will not work with AC6—you must change it to the Clang response-file syntax (@file).