Hi,
I am using MCUXpreeso 11.5.0 with SDK2.11.0 for FRDM-K66 testing.
I import demo project for HTTPS MBedTLS based server and it works fine...
Then, I created the new project with RTOS, LWIP, MBedTLS and etc...
1) I tested the new project with HELLO world by using RTOS and works fine...
2) I copy all required files from the above sample project and compile the project properly.
When I tried to run and got the following error: "Function called without core lock".
Then I compare the difference between sample and my project, found that sample project is using heap3.c and my project is using heap4.c. Then I delete heap4.c, got the compile error.
Can anybody tell me how to fix the problem? Change heapx.c will fix the problem? and how to switch to heap3.c?
Thanks,
Christie
Solved! Go to Solution.
Hello Christie
Please take a look to this website, here you will find information about the different memory implementations that FreeRTOS has.
https://www.freertos.org/a00111.html
As you can see, there are 5 different heap implementations. Usually MCUXpresso uses heap 4 when creating a new project.
If you need to switch to another implementation, I found a way to do that.
Can you please try this on your code?
If you still having problems, check out the links I’m dropping you down below. There is more information about the heap usage.
https://www.nxp.com/docs/en/quick-reference-guide/MCUXpresso_IDE_FreeRTOS_Debug_Guide.pdf
https://mcuoneclipse.com/2017/09/18/using-multiple-memory-regions-with-the-freertos-heap/
https://mcuoneclipse.com/2020/11/15/steps-to-use-freertos-with-newlib-reentrant-memory-allocation/
I hope this helps, Daniel.
Hello Christie
I have a few things to say about your problem.
First of all, could you please tell me how exactly you copied the files you just mentioned?
Could you also give me more information about the type of application you want to implement to see if we can help you with that?
Finally, could you please take a look on some of the SDK examples? Because of what you’re saying, the example lwip_httpssrv_mbedTLS_freertos sounds very similar of what you are trying to do.
Best Regards, Daniel.
HI Daniel,
If I am using demo project " lwip_httpssrv_mbedTLS_freertos" and it works fine on IDE11.2.0 and 11.5.0.
Then, I generated the new project including RTOS, IWIP, MbeTLS and etc...Then copy the required files from demo.
For IDE11.2.0, it works fine.
For IDE11.5.0, it stop working.
After I checked the difference, I found RTOS is using heap4.c instead of heap3.c in IDE11.5.0.
Looks like, heap4.c does not work properly with MbedTLS...
Thanks,
Christie
Hello Christie
Please take a look to this website, here you will find information about the different memory implementations that FreeRTOS has.
https://www.freertos.org/a00111.html
As you can see, there are 5 different heap implementations. Usually MCUXpresso uses heap 4 when creating a new project.
If you need to switch to another implementation, I found a way to do that.
Can you please try this on your code?
If you still having problems, check out the links I’m dropping you down below. There is more information about the heap usage.
https://www.nxp.com/docs/en/quick-reference-guide/MCUXpresso_IDE_FreeRTOS_Debug_Guide.pdf
https://mcuoneclipse.com/2017/09/18/using-multiple-memory-regions-with-the-freertos-heap/
https://mcuoneclipse.com/2020/11/15/steps-to-use-freertos-with-newlib-reentrant-memory-allocation/
I hope this helps, Daniel.
Looks like that this IDE generate the RTOS project with heap4.c as default. And heap4.c is not working with MbedTLS...
Can anyone to confirm this for me?
Any how to switch back to heap3.c because I tried delete and copy, it not working...
Thanks,
Christie