2020-07-03 01:39 AM
I'm compiling the demo "TouchGFX Demo 2" (the one with the carousel: 2048 game, bird-eat-coin, home automation, ...).
I also have a few peripherals/libraries in the project (freertos, mbedtls, lwip, fatfs, ...).
This results in a large number of .o files that need to be linked.
Compilation is ok, but linking fails with this error:Cannot run program "arm-atollic-eabi-g++":
Command line too long
This is with Atollic TrueSTUDIO. The same happens with STM32CubeIDE.
It happens both with the external builder and the internal builder ("Project | Properties | C/C++ Build | Builder Settings").
The settings come from the demo as created by TouchGFX designer (I've added my own application source files into that project).
It seems that the "command line too long" is a windows limitation of cmd.exe which is used to execute the linker.
I'm on Windows 8 right now.
Some say that the limit for the command line string is 8191 characters, though I've found that it's more likely 32767.
The command line is now about 48000 characters long, so I can't just shorten some file names and paths to work around it.
Moreover, most of the length comes from the nested paths and the large number of files for the TouchGFX framework and assets-converted-to-cpp, so I can't really work around it.
Is there a way to resolve the problem?
Something that doesn't require switching to Linux or changing the build process substantially (like compiling touchgfx into a static library and then linking it into the rest of the application).
Just as a note: a possible solution for the future (since it needs support in the touchgfx framework) would be to do a sort of unity build:instead of generating lots of .cpp files for fonts, texts and images (and generated-gui), they could all be generated as .incl and then included in an auto-generated "assets.cpp" or similar, so that the compiler will need to compile one file instead of tens. This would also save a substantial amount of compile time (compile times are quite long right now, both for touchgfx and for HAL libraries).Thanks
2020-08-17 04:39 AM
Hello,
What is your status ?
Have you tried with the new version of TouchGFX (4.14) and CubeIDE (1.4.1) ?
Could you enclose a screenshot of the error on CubeIDE when building the project ?
/Alexandre
2020-08-27 12:57 AM
I'm now on TouchGFX (4.14) and CubeIDE (1.4.1); it works correctly, since it uses an external file from which to load the names of the object files.
As for Atollic, for now I can get by by shortening some file paths.