659 views
in System Integration by

Hi, 

I have drawed an UI page and after I running under IAR project, I got an assert message by this sentence:

And I think it might caused when releasing some font resource (refer to call stack):

    

I didn't use special fonts, all fonts in this page are 'Times New Roman', 

I have no idea what happened, would you please give me some ideas? 

thanks!

1 Answer

0 votes
by

Hello,

I assume that the error that is detected by the memory manager is just a subsequent fault of something happened earlier.

Typically, the following things may cause some inconsistence or some overwriting within the memory:

Finally, if you are using a custom specific hardware, please ensure that the memory is working reliable (SDRAM timing, refresh, etc.) - please try the memory test in this case.

Let me know if one of the above ideas could be the reason. Btw: Is the error reproducieble?

Best regards,

Manfred.

by

Hello Manfred,

I have tested memory, remove all native codes and use only one thread(UI thread for EwMainLoop), but the problem still exist. (And yes, this error is reproducible!)

After some tries, I found the problem will not happen in these two situations:

  1. Delete Text from the view or reduce the font size(height)
  2. Remove the previous view before present another view (these two views are add dynamically)

Thanks!

by
Hello,

is it possible to provide the example in order to find the root cause? Does the error happen on a STM32 Discovery or Evaluation board?

Thank you and best regards,

Manfred
by

Hello Manfred,

I have wrote an example on STM32F469 Discovery board, but the error didn't happened.

I suspect the problem is caused by insufficient stack size, but the system always stopped at the following statement if I increase the stack size by 2 times:

#define semtstSTACK_SIZE  configMINIMAL_STACK_SIZE * 10 * 2
FreeRTOS\Source\tasks.c, line 3166

if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) 1 )
{
  ....
}

And after I porting other rtos, the error is not happened again. It seems that the error maybe caused by memory insufficient?

I would like to know your view on this, thanks a lot!!

ps. the difference of memory usage between my board and discovery board is,  I used DSI video mode instead of command mode, I think it might applied much more memories. 

by

Hello,

what is the overall stack size that you have reserved for your application? This is typically defined in the linker file and should be set to 4...8 kByte.

_Min_Stack_Size = 0x2000;

Best regards,

Manfred

by

Hello,

I can't find the variable named _Min_Stack_Size, but there's a similary defined:

CSTACK                      0x20000108   0x2000  <Block>

But like I said before, I can't set stack size above 2k when using FreeRTOS.

Currentlly i used ucos and assigned 4k stack size for GUI thread.

by
In case of FreeRTOS, the stack for each thread is allocated separately on the heap of the RTOS. If you increase the stack size for one thread (or for all threads), please ensure that the RTOS heap is large enough. For more details, please check the FreeRTOS documentation.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...