2020-10-19 01:05 AM
Keil projects shows an error when I add more than 65 screens in the project (works fine with less than or equal to 65 screens). I checked this multiple times by creating multiple new projects and even multiple versions of cubemx and touchgfx designers still no luck. I have tried cubemx 5.3, cubemx 5.6, cube mx 6.0 basically every version since 5.3. I even tried diffrent touchgfx designers from 4.10 to 4.15. When I create the same project with more than 65 screens for STM32cubeIDE it works perfectly fine.
Here's the procedure I follow
If if follow above steps for less than or equal to 65 screens It works fine. And everything works for STM32CubeIDE even 66+ screens
You can easily reproduce this error by following above steps
../middlewares/st/touchgfx/framework/include/common/Meta.hpp(90): error: #456: excessive recursion at instantiation of class "touchgfx::meta::select_type_maxsize<touchgfx::meta::TypeList<Screen65View, touchgfx::meta::TypeList<Screen66View, touchgfx::meta::Nil>>>"
struct select_type_maxsize<TypeList<First, Next> > : public type_max<First, typename select_type_maxsize<Next>::type>
detected during:
instantiation of class "touchgfx::meta::select_type_maxsize<touchgfx::meta::TypeList<First, Next>> [with First=Screen64View, Next=touchgfx::meta::TypeList<Screen65View, touchgfx::meta::TypeList<Screen66View, touchgfx::meta::Nil>>]" at line 90
../middlewares/st/touchgfx/framework/include/common/Meta.hpp(90): error: #70: incomplete type is not allowed
struct select_type_maxsize<TypeList<First, Next> > : public type_max<First, typename select_type_maxsize<Next>::type>
detected during:
instantiation of class "touchgfx::meta::select_type_maxsize<touchgfx::meta::TypeList<First, Next>> [with First=Screen64View, Next=touchgfx::meta::TypeList<Screen65View, touchgfx::meta::TypeList<Screen66View, touchgfx::meta::Nil>>]" at line 90
../TouchGFX/target/generated/TouchGFXConfiguration.cpp: 0 warnings, 4 errors
"STM32F469I-DISCO\STM32F469I-DISCO.axf" - 12 Error(s), 0 Warning(s).
Solved! Go to Solution.
2021-04-22 09:01 AM
Fixed using the "--pending_instantiations number" IAR/Keil compiler option, where number > 64, for anyone else having the same problem.
2020-10-23 06:26 AM
Interesting - I'll investigate for Keil. Thanks for reporting!
2021-04-22 07:51 AM
@Martin KJELDSEN We're seeing the same error at around 66 screens generated, using IAR (so not just a problem with Keil), and using TouchGFX Designer 4.16. Did you ever get to the bottom why this happens and how to resolve it (besides deleting screens)?
2021-04-22 09:01 AM
Fixed using the "--pending_instantiations number" IAR/Keil compiler option, where number > 64, for anyone else having the same problem.
2021-04-23 03:06 AM
Thank you for giving the fix :thumbs_up:
/Romain
2021-09-08 01:15 AM
Hi,
I tried your fix in IAR but faced the error message "-pending_instantiations may not be used unless -c++ is used" since TouchGFX projects are a mix of C and C++. How did you manage to prevent IAR from ignoring that command when compiling C files ? Do you remember which version of IAR you were using ?
/Romain
2021-09-08 01:42 AM
I didn't do it globally for the project in IAR 8.42.1, as it doesn't work with C code as you say. Against TouchGFXConfiguration.cpp and TouchGFXGeneratedHAL.cpp, I ticked the "Override inherited settings" C/C++ Compiler option and added "--pending_instantiations 100" in the Extra Options tab.
2021-09-08 05:11 AM
Ok thanks a lot :thumbs_up: I can compile now.
I had to also override the FrontendApplicationBase.cpp as well if other people face this issue.
/Romain
2024-06-13 03:28 AM
sir ,
is that possible to develop 300 screens for a single project and run it