Skip to main content
Hab Collector
Associate III
Mar 3, 2025 12:24 PM UTC
Question

Error 1 2 in TouchGFX simulator

My humble apologies, I have seen similar posts on TouchGFX errros in simulate and could not find a relevant post that worked.  Using TouchGFX 4.24.2 and STM32CubeIDE.  I added to my project .c and .h file and placed them in a directory of App_Support with corresponding sub-directories of Inc and Src.  Application >> User >> App_Support.  The necessary path was added to the project settings includes.  The project will compile under STM32CubeIDE, but when I motion back to TouchGFX, though it compiles, the simulator errors:

 

No rule to make target 'build/MINGW32_NT-6.2/../../STM32CubeIDE/Application/User/App_Support/Src/Main_Support.o', needed by 'build/bin/simulator.exe'.

 

I have the simulator makefile modified as such:

ADDITIONAL_SOURCES := ../../STM32CubeIDE/Application/User/App_Support/Src/Main_Support.c
ADDITIONAL_INCLUDE_PATHS := ../../STM32CubeIDE/Application/User/App_Support/Inc

I have even tried a variation of ADDITIONAL_SOURCES:

ADDITIONAL_SOURCES := ../../STM32CubeIDE/Application/User/App_Support/Src which gives a somewhat similar error: No rule to make target '../../STM32CubeIDE/Application/User/App_Support/Src', needed by 'build/bin/simulator.exe'

 

Any assistance would be wonderful.

This topic has been closed for replies.

8 replies

GaetanGodart
ST Employee
Mar 10, 2025 1:02 PM UTC

Hello @Hab Collector ,

 

Could you share your complete modified Makefile?

 

Can you try to add 

# Add the additional include paths to the CFLAGS
CFLAGS += -I$(ADDITIONAL_INCLUDE_PATHS)

 

Regards, 

Gaetan GodartSoftware engineer at ST (TouchGFX)
Hab Collector
Associate III
Mar 10, 2025 1:22 PM UTC

Can you please expand upon where CFLAGS would be located.  That is unclear to me.  The page would not accept the make file attachment.  I will just pasted it below...

 

# Helper macros to convert spaces into question marks and back again
e := 
sp := $(e) $(e)
qs = $(subst ?,$(sp),$1)
sq = $(subst $(sp),?,$1)

# Get name of this Makefile (avoid getting word 0 and a starting space)
makefile_name := $(wordlist 1,1000,$(MAKEFILE_LIST))

# Get path of this Makefile
makefile_path := $(call qs,$(dir $(call sq,$(abspath $(call sq,$(makefile_name))))))

# Get path where the Application is
application_path := $(call qs,$(abspath $(call sq,$(makefile_path)../..)))

.PHONY: clean assets all

ifneq ($(words $(makefile_path))$(words $(MAKEFILE_LIST)),11)
all clean assets:
$(error Spaces not allowed in path)
else

ADDITIONAL_SOURCES := ../../STM32CubeIDE/Application/User/App_Support/Src
ADDITIONAL_INCLUDE_PATHS := ../../STM32CubeIDE/Application/User/App_Support/Inc
ADDITIONAL_LIBRARY_PATHS := 
ADDITIONAL_LIBRARIES :=
export ADDITIONAL_SOURCES ADDITIONAL_INCLUDE_PATHS ADDITIONAL_LIBRARY_PATHS ADDITIONAL_LIBRARIES

all: $(filter assets,$(MAKECMDGOALS))
all assets: $(filter clean,$(MAKECMDGOALS))
all clean assets:
@$(MAKE) -r -f generated/simulator/gcc/Makefile -s $(MFLAGS) $@ -C "$(application_path)"
endif
 
Thanks,
Hab
GaetanGodart
ST Employee
Mar 21, 2025 1:21 PM UTC

Hello @Hab Collector ,

 

Sorry for the late answer.
You have to add

ADDITIONAL_SOURCES += myOwnLib/src/myLib.cpp
ADDITIONAL_INCLUDE_PATHS += myOwnLib/include

yo tour makefile.

Obviously, change the files names to match yours.

 

Please find attached the whole project.
In the screenView, I call functions from myLic.cpp.
myLib is in the folder myOwnLib.
The modified Makefile is in simulator/gcc.

 

Regards,

Gaetan GodartSoftware engineer at ST (TouchGFX)