Skip to main content
Hab Collector
Associate III
March 3, 2025
Question

Error 1 2 in TouchGFX simulator

  • March 3, 2025
  • 1 reply
  • 780 views

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.

1 reply

GaetanGodart
Technical Moderator
March 10, 2025

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, 

Hab Collector
Associate III
March 10, 2025

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
Technical Moderator
March 10, 2025

You can try that:

# 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/Main_Support.c
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

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

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

 Note that I have change your additional source to have a specific file instead of a folder.

 

Regards,