Sorry for the late reply!
Please refer feedback from SDK team:
The demo is using malloc / free wrappers for memory allocation in FreeRTOS.
The _sbrk function, which is coming from newlib and is called by malloc, makes a check whether the newly allocated memory does not go over stack pointer.
Since we are using RTOS, the stack is allocated within a heap and the check does not make sense.
The solution could be to overwrite the definition of _sbrk function.
Little bit of information about the problem is here:
https://mcuoneclipse.com/2014/03/16/freertos-malloc-and-sp-check-with-gnu-tools/
The fix is to provide fsl_sbrk.c file with alternative _sbrk() function definition if the project uses FreeRTOS with heap_3.c allocation (wrapper for malloc/free) and it is for arm-gcc based toolchain.
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------