2026-03-04 10:27 PM - edited 2026-03-05 6:35 AM
Hello,
I'm trying to use TouchGFX.
I created a new project and clicked on Generate code.
Afterwards I get the following error message, which I do not know how to handle. Do you have any suggestions?
Generate Code
Copy Framework
Copying TouchGFX framework version 4.24.1 to C:\temp\testgfx\MyApplication\touchgfx
Done
Generate
Wrote config/gcc/app.mk
Wrote config/msvs/Application.props
Wrote generated/gui_generated/include/gui_generated/common/FrontendApplicationBase.hpp
Wrote generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp
Wrote generated/gui_generated/include/gui_generated/common/SimConstants.hpp
Wrote generated/gui_generated/include/gui_generated/screen1_screen/Screen1ViewBase.hpp
Wrote generated/gui_generated/src/common/FrontendApplicationBase.cpp
Wrote generated/gui_generated/src/screen1_screen/Screen1ViewBase.cpp
Wrote generated/simulator/gcc/Makefile
Wrote generated/simulator/include/simulator/mainBase.hpp
Wrote generated/simulator/include/simulator/video/DirectFrameBufferVideoController.hpp
Wrote generated/simulator/include/simulator/video/MJPEGDecoder.hpp
Wrote generated/simulator/include/simulator/video/SoftwareMJPEGDecoder.hpp
Wrote generated/simulator/msvs/touchgfx_prebuild.targets
Wrote generated/simulator/msvs/touchgfx_sdl2.props
Wrote generated/simulator/msvs/touchgfx.props
Wrote generated/simulator/src/mainBase.cpp
Wrote generated/simulator/src/video/SoftwareMJPEGDecoder.cpp
Wrote generated/simulator/touchgfx.ico
Wrote generated/simulator/touchgfx.rc
Wrote generated/simulator/touchgfx.res
Wrote generated/user.config
Wrote gui/include/gui/common/FrontendApplication.hpp
Wrote gui/include/gui/common/FrontendHeap.hpp
Wrote gui/include/gui/model/Model.hpp
Wrote gui/include/gui/model/ModelListener.hpp
Wrote gui/include/gui/screen1_screen/Screen1Presenter.hpp
Wrote gui/include/gui/screen1_screen/Screen1View.hpp
Wrote gui/src/common/FrontendApplication.cpp
Wrote gui/src/model/Model.cpp
Wrote gui/src/screen1_screen/Screen1Presenter.cpp
Wrote gui/src/screen1_screen/Screen1View.cpp
Wrote simulator/gcc/Makefile
Wrote simulator/main.cpp
Wrote simulator/msvs/Application.sln
Wrote simulator/msvs/Application.vcxproj
Wrote simulator/msvs/Application.vcxproj.filters
Wrote target.config
Done
Generate Assets
make -f simulator/gcc/Makefile assets -j8
Der Befehl "Co." ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Failed
Failed
Solved! Go to Solution.
2026-03-11 11:37 PM
Executing the make commands from the touchGfx Environment console works.
Only executing from the touchGfx GUI is problematic.
I will just use the console from now on. Maybe its a bug in touchgfx gui.
2026-03-05 12:08 AM - edited 2026-03-05 12:08 AM
> Der Befehl "Co." ist entweder falsch geschrieben oder konnte nicht gefunden werden.
This means something like "the command 'Co.' could not be found".
Somewhere in your makefile or a script called from there will be the sequence "Co." by accident...
2026-03-05 2:45 AM
I created a new project and did not do any modifications to the makefiles afterwards.
How can I find out where the command 'Co.' is called?
2026-03-05 2:54 AM
Do you have any file or folder names with spaces (or other "special" characters) in them?
That is often a cause of such "strange" error messages ...
PS:
Why did you put the output log in a 'Spoiler' tag?
2026-03-05 3:02 AM
Where would you put the output log?
I used a quite simple path as project location:
C:\temp\testgfx\MyApplication\touchgfx
So I think the path should not be the root cause?
My TouchGfx is installed in C:\TouchGFX\4.24.1.
2026-03-05 3:09 AM
2026-03-05 6:37 AM
Ok, thanks for the hint with the preformatted code. Still I found no solution. I tried to find out if I could make the output more verbose but did not succeed. Any hints on that?
2026-03-05 6:57 AM
make -f simulator/gcc/Makefile assets -j8
Der Befehl "Co." ist entweder falsch geschrieben oder konnte nicht gefunden werden.
Review the makefile (named "Makefile") in the given directory.
Or post it's contents here if necessary.
The make command is trying to execute something that is not a command.
It might be indirectly via environment variables.
2026-03-09 1:59 AM
I cannont find the comman Co. in the makefiles. It would be helpful to know wich line causes the error....
If I call make from the shell in the touchgfx environment the build works, but not from the touch gfx gui.
MyApplication/simulator/gcc/Makefile:
# 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 :=
ADDITIONAL_INCLUDE_PATHS :=
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
# Get identification of this system
ifeq ($(OS),Windows_NT)
UNAME := MINGW32_NT-6.2
else
UNAME := $(shell uname -s)
endif
board_name := $(UNAME)
.PHONY: all clean assets
# Directories containing application-specific source and header files.
# Additional components can be added to this list. make will look for
# source files recursively in comp_name/src and setup an include directive
# for comp_name/include.
components := gui simulator generated/gui_generated generated/simulator
# Location of folder containing bmp/png files.
asset_images_input := assets/images
# Location of folder to search for ttf font files
asset_fonts_input := assets/fonts
# Location of folder where the texts.xml is placed
asset_texts_input := assets/texts
# Location of folder where video files are places
asset_videos_input := assets/videos
build_root_path := build
object_output_path := $(build_root_path)/$(board_name)
binary_output_path := $(build_root_path)/bin
# Location of output folders where autogenerated code from assets is placed
asset_root_path := generated
asset_images_output := $(asset_root_path)/images
asset_fonts_output := $(asset_root_path)/fonts
asset_texts_output := $(asset_root_path)/texts
asset_videos_output := $(asset_root_path)/videos
#include application specific configuration
include config/gcc/app.mk
### END OF USER SECTION. THE FOLLOWING SHOULD NOT BE MODIFIED ###
ifeq ($(UNAME), Linux)
library_path := $(touchgfx_path)/3rdparty/libjpeg/lib/linux $(touchgfx_path)/lib/linux $(ADDITIONAL_LIBRARY_PATHS)
libraries := touchgfx SDL2 SDL2_image jpeg rt m pthread dl $(ADDITIONAL_LIBRARIES)
libstart := -Wl,--start-group
libend := -Wl,--end-group
libextra :=
library_includes += $(touchgfx_path)/3rdparty/libjpeg/include
linker_options_local := -Xlinker -rpath -Xlinker $(touchgfx_path)/3rdparty/libjpeg/lib/linux
resource_file :=
imageconvert_executable := $(touchgfx_path)/framework/tools/imageconvert/build/linux/imageconvert.out
fontconvert_executable := $(touchgfx_path)/framework/tools/fontconvert/build/linux/fontconvert.out
simulator_executable := simulator.out
linker_options += -static-libgcc -Xlinker --no-as-needed
else
sdl_library_path := $(touchgfx_path)/lib/sdl2/win32
jpeg_library_path := $(touchgfx_path)/3rdparty/libjpeg/lib/win32
library_path := $(sdl_library_path) $(jpeg_library_path) $(touchgfx_path)/lib/win/mingw32 $(ADDITIONAL_LIBRARY_PATHS)
libraries := touchgfx SDL2 SDL2_image jpeg-8 m pthread mingw32 $(ADDITIONAL_LIBRARIES)
libstart := -Wl,--start-group
libend := -Wl,--end-group
libextra := -Wl,--subsystem,windows
library_includes += $(touchgfx_path)/framework/include/platform/hal/simulator/sdl2/vendor $(touchgfx_path)/3rdparty/libjpeg/include
resource_file := generated/simulator/touchgfx.res
imageconvert_executable := $(touchgfx_path)/framework/tools/imageconvert/build/win/imageconvert.out
fontconvert_executable := $(touchgfx_path)/framework/tools/fontconvert/build/win/fontconvert.out
simulator_executable := simulator.exe
$(resource_file): $(resource_file:%.res=%.rc) $(resource_file:%.res=%.ico)
@echo Creating Windows resource file with program icon
@windres $(resource_file:%.res=%.rc) -O coff -o $@
linker_options += -static-libgcc -static-libstdc++
endif
c_compiler := g++
c_compiler_options += -DSIMULATOR='' -g
cpp_compiler := g++
cpp_compiler_options += -g -DSIMULATOR='' -DENABLE_LOG
linker := g++
WARN = error all extra write-strings init-self cast-qual \
pointer-arith strict-aliasing format=2 uninitialized \
missing-declarations no-long-long no-unused-parameter \
no-variadic-macros no-format-extra-args \
no-conversion no-overloaded-virtual
CXXWARN = non-virtual-dtor ctor-dtor-privacy
c_compiler_options_local += -pedantic $(addprefix -W,$(WARN))
cpp_compiler_options_local += -pedantic $(addprefix -W,$(WARN) $(CXXWARN))
#include everything + specific vendor folders
framework_includes := $(touchgfx_path)/framework/include
#only take in the source we want to build for this sim
framework_files := $(touchgfx_path)/framework/source/platform/driver/touch/SDL2TouchController.cpp
framework_source := $(touchgfx_path)/framework/source/platform/hal/simulator/sdl2
#this needs to change when assset include folder changes.
all_components := $(components) \
$(asset_fonts_output) \
$(asset_images_output) \
$(asset_texts_output) \
$(asset_videos_output)
#keep framework include and source out of this
include_paths := $(library_includes) $(foreach comp, $(all_components), $(comp)/include) $(framework_includes) $(ADDITIONAL_INCLUDE_PATHS)
source_paths = $(foreach comp, $(all_components), $(comp)/src) $(framework_source) simulator
# Finds files that matches the specified pattern. The directory list
# is searched recursively. It is safe to invoke this function with an
# empty list of directories.
#
# Param $(1): List of directories to search
# Param $(2): The file pattern to search for
define find
$(foreach dir,$(1),$(foreach d,$(wildcard $(dir)/*),\
$(call find,$(d),$(2))) $(wildcard $(dir)/$(strip $(2))))
endef
unexport find
fontconvert_ttf_lower_files := $(call find, $(asset_fonts_input), *.ttf)
fontconvert_ttf_upper_files := $(call find, $(asset_fonts_input), *.TTF)
fontconvert_otf_lower_files := $(call find, $(asset_fonts_input), *.otf)
fontconvert_otf_upper_files := $(call find, $(asset_fonts_input), *.OTF)
fontconvert_bdf_lower_files := $(call find, $(asset_fonts_input), *.bdf)
fontconvert_bdf_upper_files := $(call find, $(asset_fonts_input), *.BDF)
fontconvert_font_files := $(fontconvert_ttf_lower_files) \
$(fontconvert_ttf_upper_files) \
$(fontconvert_otf_lower_files) \
$(fontconvert_otf_upper_files) \
$(fontconvert_bdf_lower_files) \
$(fontconvert_bdf_upper_files)
source_files := $(call find, $(source_paths),*.cpp) $(framework_files) $(ADDITIONAL_SOURCES)
c_source_files := $(call find, $(source_paths),*.c)
object_files := $(source_files:$(touchgfx_path)/%.cpp=$(object_output_path)/touchgfx/%.o) $(c_source_files:$(touchgfx_path)/%.c=$(object_output_path)/touchgfx/%.o)
object_files := $(object_files:%.cpp=$(object_output_path)/%.o)
object_files := $(object_files:%.c=$(object_output_path)/%.o)
dependency_files := $(object_files:%.o=%.d)
textconvert_script_path := $(touchgfx_path)/framework/tools/textconvert
videoconvert_script_path := $(touchgfx_path)/framework/tools/videoconvert
text_database := $(asset_texts_input)/texts.xml
.PHONY: all clean assets generate_assets build_executable
all: generate_assets
generate_assets: assets
@$(MAKE) -f generated/simulator/gcc/Makefile -r -s $(MFLAGS) build_executable
build_executable: $(binary_output_path)/$(simulator_executable) post_build
$(binary_output_path)/$(simulator_executable): $(object_files) $(resource_file)
@echo Linking $(@)
@mkdir -p $(@D)
@mkdir -p $(object_output_path)
@$(file >$(build_root_path)/objects.tmp) $(foreach F,$(object_files),$(file >>$(build_root_path)/objects.tmp,$F))
@$(linker) \
$(linker_options) $(linker_options_local) \
$(patsubst %,-L%,$(library_path)) \
@$(build_root_path)/objects.tmp -o $@ $(resource_file) \
$(libstart) $(patsubst %,-l%,$(libraries)) $(libend) $(libextra)
@rm -f $(build_root_path)/objects.tmp
# Remove old images
@rm -f $(binary_output_path)/*.bin
@if ls $(asset_videos_output)/bin/*.bin >/dev/null 2>&1; then cp $(asset_videos_output)/bin/*.bin $(binary_output_path); fi
ifneq ($(UNAME), Linux)
@if [ ! -f $(binary_output_path)/SDL2.dll ]; then cp $(sdl_library_path)/SDL2.dll $(binary_output_path); fi
@if [ ! -f $(binary_output_path)/SDL2_image.dll ]; then cp $(sdl_library_path)/SDL2_image.dll $(binary_output_path); fi
@if [ ! -f $(binary_output_path)/libpng16-16.dll ]; then cp $(sdl_library_path)/libpng16-16.dll $(binary_output_path); fi
@if [ ! -f $(binary_output_path)/zlib1.dll ]; then cp $(sdl_library_path)/zlib1.dll $(binary_output_path); fi
@if [ ! -f $(binary_output_path)/libjpeg-8.dll ]; then cp $(jpeg_library_path)/libjpeg-8.dll $(binary_output_path); fi
endif
.PHONY: post_build
post_build:
@mkdir -p $(binary_output_path)
@if [ -f simulator/landscape.png ]; then cp simulator/landscape.png $(binary_output_path); else rm -f $(binary_output_path)/landscape.png; fi
@if [ -f simulator/portrait.png ]; then cp simulator/portrait.png $(binary_output_path); else rm -f $(binary_output_path)/portrait.png; fi
$(object_output_path)/touchgfx/%.o: $(touchgfx_path)/%.cpp config/gcc/app.mk
@echo Compiling $<
@mkdir -p $(@D)
@$(cpp_compiler) \
-MMD -MP $(cpp_compiler_options) $(cpp_compiler_options_local) $(user_cflags) \
$(patsubst %,-I%,$(include_paths)) \
-c $< -o $@
$(object_output_path)/%.o: %.cpp config/gcc/app.mk
@echo Compiling $<
@mkdir -p $(@D)
@$(cpp_compiler) \
-MMD -MP $(cpp_compiler_options) $(cpp_compiler_options_local) $(user_cflags) \
$(patsubst %,-I%,$(include_paths)) \
-c $< -o $@
$(object_output_path)/%.o: %.c config/gcc/app.mk
@echo Compiling $<
@mkdir -p $(@D)
@$(c_compiler) \
-MMD -MP $(c_compiler_options) $(c_compiler_options_local) $(user_cflags) \
$(patsubst %,-I%,$(include_paths)) \
-c $< -o $@
ifeq ($(MAKECMDGOALS),build_executable)
$(firstword $(dependency_files)): config/gcc/app.mk
@rm -rf $(object_output_path)
-include $(dependency_files)
endif
assets: images texts videos
.PHONY: images
images:
@$(imageconvert_executable) -r $(asset_images_input) -w $(asset_images_output)
.PHONY: texts
texts:
@ruby $(textconvert_script_path)/main.rb $(text_database) $(fontconvert_executable) $(asset_fonts_output) $(asset_texts_output) $(asset_fonts_input) .
.PHONY: videos
videos:
@ruby $(videoconvert_script_path)/videoconvert.rb $(asset_videos_input) $(asset_videos_output)
clean:
@echo Cleaning
@rm -rf $(build_root_path)
# Do not remove gui_generated
@rm -rf $(asset_images_output)
@rm -rf $(asset_fonts_output)
@rm -rf $(asset_texts_output)
@rm -rf $(asset_videos_output)
# Create directory to avoid error if it does not exist
@mkdir -p $(asset_root_path)
# Remove assets folder if it is empty (i.e. no gui_generated folder)
@rmdir --ignore-fail-on-non-empty $(asset_root_path)
2026-03-09 3:16 AM
I would recommend to capture the full output, and work your way back to identify were it came from.
Your make file contains several string manipulation operations like this :
sq = $(subst $(sp),?,$1)
...
makefile_path := $(call qs,$(dir $(call sq,$(abspath $(call sq,$(makefile_name))))))Which is probably were it goes wrong.