cancel
Showing results for 
Search instead for 
Did you mean: 

Cmake CreateProcess linking error 87 while compiling with TouchGFX Designer

Angela_b
Associate

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/CM7/TouchGFX/gui/src/startops_screen/StartOpsView.o

...
CM7/TouchGFX/build/Riverdi_70STM32H7/Drivers/STM3gcc/makefile_cm7:448: recipe for target 'CM7/TouchGFX/build/bin/target.elf' failed
2H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.o
CM7/TouchGFX/build/Riverdi_70STM32H7/Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.o
...
CM7/TouchGFX/build/Riverdi_70STM32H7/Utilities/JPEG/jpeg_utils.o
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
Failed
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,

Angela

3 REPLIES 3
MBrau.7
Associate II

Hi Angela,

i ran in kind of the same problem. Did you find any solution apart from renaming your content or keeping it compact?

Thanks for your feedback,
Marvin

Hi MBrau,

another trick you can try is to shorten the build path in the cortex makefile at the parameter "build_root_path".

Example:

/* original path */
build_root_path := CM7/TouchGFX/build

/* new path */
build_root_path := ./build

 This allows to shorten the .o files linking paths, in the case above there are 12 characters less per file which is nice.

If that still doesn't work or you intend to add more assets and modules you can try to open the project on STM32CubeIDE to compile and flash the boards. The IDE compiles without calling the CreateProcess directive, so it doesn't have the 33K characters limit on combined filepaths of the Designer.

We're currently using it for the project mentioned in this thread to write the backend part and debugging, so compiling and flashing with the IDE wether with the Designer didn't make a difference for us. 

I hope this helps.

 

Angela

MBrau.7
Associate II

Hi Angela,

Thanks for your feedback! Meanwhile i found another solution which is working great for me so far.
Have a look at:

https://community.renesas.com/mcu/ra/f/forum/29712/gcc-compiler-error-make-e-87-error


The idea is to outsource the objects into a separate file to overcome the character limitation of ~32k.
Maybe this is also a solution for you?

Greets
Marvin