Skip to main content
Visitor II
September 12, 2023
Question

How to change screen transition heap ?

  • September 12, 2023
  • 1 reply
  • 901 views

Hi ,

I've implemented multiple screen in my project(Custom project using STM32F429zi controller with external RAM and Flash). I'm getting memory fault issue whenever I'm transitioning from one particular screen to any other screen. When I debugged I got source of problem at below mentioned line 

assert(sizeof(TransType) <= heap.transitionStorage.element_size() && "Transition allocation error: Check that all transitions are added to FrontendHeap::TransitionTypes");

in function

'PresenterType* makeTransition(Screen** currentScreen, Presenter** currentPresenter, MVPHeap& heap, Transition** currentTrans, ModelType* model)' 

under file 'mvp/MVPApplication.hpp'

I think I've added more widget and container to screen, due to which during transitioning it is crossing allocated heap memory for transitioning screen, correct me if I'm wrong here. If yes , how can we increase allocated heap for screen transition.

thank you.

 

 

 

This topic has been closed for replies.

1 reply

jimmii
Senior II
September 14, 2023

Hi

There is a file called FrontendHeap.hpp

There you have to add your user-defined ViewTypes, PresenterTypes and TransitionTypes

 typedef touchgfx::meta::TypeList< touchgfx::meta::Nil, //Replace this with first user-defined type
 touchgfx::meta::Nil //List must always end with meta::Nil !
 > UserDefinedViewTypes;

 /* List any user-defined presenter types here*/
 typedef touchgfx::meta::TypeList< touchgfx::meta::Nil, //Replace this with first user-defined type
 touchgfx::meta::Nil //List must always end with meta::Nil !
 > UserDefinedPresenterTypes;

 /* List any user-defined transition types here*/
 typedef touchgfx::meta::TypeList< touchgfx::meta::Nil, //Replace this with first user-defined type
 touchgfx::meta::Nil //List must always end with meta::Nil !
 > UserDefinedTransitionTypes;