Showing results for 
Search instead for 
Did you mean: 

Cmake CreateProcess linking error 87 while compiling with TouchGFX Designer


Hi everyone,

I'm using TouchGFX Designer 4.21.0 to develop a project with my colleagues on a ST partner board with embedded STM32H757XIH6. During the last development cycle we added a custom container, two fonts, two images and some strings, but when we compiled it we got this error (path list shortened for readability):

process_begin: CreateProcess(C:\TouchGFX\4.21.0\env\MinGW\msys\1.0\bin\sh.exe, C:/TouchGFX/4.21.0/env/MinGW/msys/1.0/bin/sh.exe -c "# @echo 

CM7/TouchGFX/build/Riverdi_70STM32H7/Drivers/STM3gcc/makefile_cm7:448: recipe for target 'CM7/TouchGFX/build/bin/target.elf' failed
CM7/TouchGFX/build/Riverdi_70STM32H7/Common/Src/system_stm32h7xx_dualcore_boot_cm4_cm7.o", ...) failed.
make (e=87): Parametro non corretto. (translates to "incorrect parameter")

make[3]: *** [CM7/TouchGFX/build/bin/target.elf] Error 87
make[2]: *** [generate_assets] Error 2
make[3]: Leaving directory '<project_directory_path>'
gcc/makefile_cm7:444: recipe for target 'generate_assets' failed
make[2]: Leaving directory '<project_directory_path>'
make[1]: *** [all] Error 2
make: *** [flash] Error 2
Makefile_cm7:51: recipe for target 'all' failed
make[1]: Leaving directory '<project_directory_path>/gcc'
../../gcc/Makefile:10: recipe for target 'flash' failed

Our project has lots of assets, 10 screens and 15 custom containers, it's a big project but always worked well on the board.

The information I gathered to fix this issues point at the CreateProcess instruction limit, which is about 32K characters, and the complete error log inside the brackets counts about 33K characters. Removing the last added custom container and the 2 images "fixes" the issue, leading to a successful compile without the makefile error.

In any case, this is the makefile code snippet that fails in the log:

447 $(binary_output_path)/$(target_executable): $(object_files) $(object_asm_files)
448 # @echo $(object_files)
449 # @echo $(object_files_video)
450 # @echo $(application_path)/STM32CubeIDE\CM7\Stldr\$(stldr)
451 # @echo $(st_stm32cube_external_loader)
452 @echo Linking $(@)
453 @mkdir -p $(@D)
454 @mkdir -p $(object_output_path)

If the Create Process character limit is the real issue, is there a way to give this instruction shorter paths (like starting straight from CM7/TouchGFX/build/Riverdi_70STM32H7) or use another linking command? We also could rename some assets and modules, but this is an ongoing project and there's the possibility we'll have to add some more features and could reach the same error even with shorter names on our assets and modules.

Thanks in advance,