Skip to main content
HNguy.21
Associate II
March 31, 2020
Question

FrontendHeap problem

  • March 31, 2020
  • 13 replies
  • 3092 views

Hi ,

I have problem with the Heap issue (for many views I think)

I try to comment some view in FrontendHeapBase and it can flash into kit, but I found out in some view using more heap than declare --> it errors.

Can you help me fix this problem??

Thank alot.

This topic has been closed for replies.

13 replies

HNguy.21
HNguy.21Author
Associate II
March 31, 2020

0693W000000V3cAQAS.png

Martin KJELDSEN
Principal III
March 31, 2020

I'm not sure what "Comment some view" means, but generally, if you're trying to add a View manually, you also need to let the FrontEndHeap know so that it can calculate how much memory, worst case, to put aside for worst case allocation.

When using the Designer this will automatically be done for you. If manually, then you need to add your View/PresenterType to the list inside FrontEndHeap.hpp.

/**
 * A list of all view types. Must end with meta::Nil.
 * @note All view types used in the application MUST be added to this list!
 */
 typedef touchgfx::meta::TypeList< MyView,
 touchgfx::meta::Nil
 > ViewTypes;
 
 /**
 * Determine (compile time) the View type of largest size.
 */
 typedef touchgfx::meta::select_type_maxsize< ViewTypes >::type MaxViewType;
 
 /**
 * A list of all presenter types. Must end with meta::Nil.
 * @note All presenter types used in the application MUST be added to this list!
 */
 typedef touchgfx::meta::TypeList< MyPresenter,
 touchgfx::meta::Nil
 > PresenterTypes;

/Martin

HNguy.21
HNguy.21Author
Associate II
March 31, 2020

Hi Martin,

It's excessive recursion in FrontendHeapBase and I comment some touchgfx::meta::TypeList< ... View/Presenter,

run is ok on kit, but some views with lots widget, it errors.

0693W000000V3cAQAS.png

0693W000000V5SbQAK.png

0693W000000V5U8QAK.png

Martin KJELDSEN
Principal III
March 31, 2020

Which class is it complaining about? can't see from your screenshot

/Martin

MTana.1
Associate II
October 10, 2020

Sorry for jumping in.

I have similar problem. I try to add 65 screens and build, then OK. But add 66 screens, then ERROR with IAR compiler.

ERROR[Pe456]: excessive recursion at instantiation of class "touchgfx::meta::select_type_maxsize<touchgfx::meta::TypeList<N175_screenView, E:\test\Middlewares\ST\touchgfx\framework\include\common\Meta.hpp 90  0693W000004JNSMQA4.pngGCC compile (simulator) is OK.

Could you please help me?

HNguy.21
HNguy.21Author
Associate II
October 10, 2020

I found that C maximum recursion just about 64. You need to set your complier using only C++ language to solve this.

MTana.1
Associate II
October 12, 2020

Thank you for the prompt response.

I confirmed to resolve with adding build option on EWARM (--pending_instantiations 0).

However the maker said maximum recursion is 1024. It means the maximum screen number is 1024, correct?

PCabr.1
Associate II
August 3, 2021

Hello All, i know that is a old post, but i'm having, i think the same problem, but i'm using a CUBE IDE + touchgfx

In my case, when i try to add a 7 screen, many errors happening, in Frontendheadp, meta.hpp.

but when i remove the 7 screen and work just with 6, everything back to normal.

Any advise on that? i tried to find any place to increase the number of screen and i didn't find.

the last problem that i have, was creating a custom loader for my project using W25q128, but it was solved and i think this not the problem.

because the all application was working until i add this 7 screen.

Martin KJELDSEN
Principal III
August 9, 2021

What are your compiler settings? If you use the designer to generate this code (when you add and remove screens) then it should be programatically correct, at least. Maybe some files got removed? E.g. MaxGeneratedViewType was not declared and it's complaining about incomplete types.