Sorry, looks like replies via Thunderbird make it through to the list but all text is stripped. Here we go again:
On 3/26/2015 12:46 AM, ZhangJennie wrote:
> can you please upload your demo project to showcase your issue? thanks!
Do not have a demo project but here are 3 easy steps to reproduce:
1. In KDS import hello_world_frdm22k demo project from KSDK_1.1.0/demos/hello_world/kds/frdmk22f
2. Add calls to malloc/free somewhere in main(), e.g.:
.....
{
void *p;
p = malloc(10);
if(p)
free(p);
}
....
3. Check map file for presence of locking functions:
grep malloc_lock hello_world_frdmk22f.map
Or use text editor if grep is not available.
You will see that locking functions are not there.
If I add my own locking functions using RTOS locking mechanics they will
not get called either.
BTW, problem was solved by overriding library malloc/free with RTOS equivalents
instead of trying to protect them.
Regards,
Sergei