cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX Maximum number of screens for Keil uVision IDE

Karan Kolhe
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

8 REPLIES 8
Martin KJELDSEN
Chief III

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

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

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

Thank you for giving the fix 👍

/Romain

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

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.

Ok thanks a lot 👍 I can compile now.

I had to also override the FrontendApplicationBase.cpp as well if other people face this issue.

/Romain

sir ,

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