Skip to main content
Karan Kolhe
Associate II
October 19, 2020
Solved

TouchGFX Maximum number of screens for Keil uVision IDE

  • October 19, 2020
  • 4 replies
  • 2525 views

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

  1. Open touchGFX designer
  2. Select my board STM32F469i-DISCO and Blank ui
  3. Add 66 screen and 2-3 buttons
  4. Generate project
  5. Open cubemx file of project and select MDK ARM 5.28.0.0 Keil IDE and generate project for keil
  6. Open project in keil
  7. Compile errors in meta.h file which is part of touchgfx framework and not a user file

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).

 0693W000004KCPdQAO.png0693W000004KCQgQAO.png

Best answer by moredatalesscenter

Fixed using the "--pending_instantiations number" IAR/Keil compiler option, where number > 64, for anyone else having the same problem.

4 replies

Martin KJELDSEN
Principal III
October 23, 2020

Interesting - I'll investigate for Keil. Thanks for reporting!

Associate III
June 13, 2024

sir ,

is that possible to develop 300 screens  for a single project and run it 

 

moredatalesscenter
Associate III
April 22, 2021

@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)?

moredatalesscenter
Associate III
April 22, 2021

Fixed using the "--pending_instantiations number" IAR/Keil compiler option, where number > 64, for anyone else having the same problem.

Romain DIELEMAN
ST Employee
April 23, 2021

Thank you for giving the fix :thumbs_up:

/Romain

moredatalesscenter
Associate III
September 8, 2021

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.

Romain DIELEMAN
ST Employee
September 8, 2021

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