vApplicationMallocFailedHook getting triggered when creating multiple tasks

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

vApplicationMallocFailedHook getting triggered when creating multiple tasks

801件の閲覧回数
arpandutta0000
Contributor I

Hi Team,
We are facing an issue where vApplicationMallocFailedHook gets triggered when creating multiple tasks.

Context:
We are trying to develop a FreeRTOS application using the NXP-provided RTOS SDK for the iMX8 QuadMax board. We can create, build, and run sample hello world application. We are using the build_debug.sh script to build the application.

Issue:
When we create multiple tasks(around 4-5 tasks) with a stack depth of 0x800U with just some minimal logs, vApplicationMallocFailedHook function gets triggered and the application behaves unexpectedly afterward.

Additional Info:
We found a few threads regarding the same where the solution suggests increasing the heap size using some version of MCUXpresso IDE.

referred threads:
https://community.nxp.com/t5/Kinetis-Microcontrollers/FreeRTOS-bumping-into-vApplicationMallocFailed...

https://community.nxp.com/t5/MCUXpresso-IDE/How-to-configure-heap-and-stack-sizes-in-MCUXpresso/m-p/...

 

Questions:

  1. Is increasing heap size the proper way to resolve vApplicationMallocFailedHook issue or should we look into something else? 
  2. If we need to increase heap size, how to do it without using the MCUXpresso IDE? Which file(s) do we need to edit to increase the heap size?
ラベル(1)
0 件の賞賛
返信
1 返信

733件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @arpandutta0000 

Refering the link you provided, for freertos stack size modification on MPU SDK, please find below config in FreeRTOSConfig.h

Zhiming_Liu_0-1715043661618.png

 

0 件の賞賛
返信