cancel
Showing results for 
Search instead for 
Did you mean: 

FrontendHeap problem

HNguy.21
Associate II

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.

13 REPLIES 13
HNguy.21
Associate II

0693W000000V3cAQAS.png

Martin KJELDSEN
Chief III

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

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

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

/Martin

with lots views in FrontendHeapBase declare by Designer, I can't compile code.

I just comment some to not excessive recursion -> compile ok but when run on h747 kit, some views with large heap size

--> it freeze at this view. Can you help me fix that problem.

Do you also have this issue with gcc (simulator through designer).

/Martin

MTana.1
Associate II

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?

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

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?