I have posted a similar message to the MQX forum, but I was not sure if this forum would be more appropriate. If the USB LDD is added to the bsp_twrk40x256_pe BSP project in CW 10.1 using MQX 3.7, a link error occurs indicating that "_mem_alloc_system_align" is not defined when the pe_demo_twrk40x256 MQX sample project is built. I have not found any reference to this function in the MQX documentation. This code is generated by Processor expert, and I do not know how to resolve the erorr.
已解决! 转到解答。
Hello,
the solution of the issue is here:
https://community.freescale.com/thread/100242
best regards
Vojtech Filip
Processor Expert Support Team
Glad to could help you, could you please tell the steps how you get it compiled, I tried to add the USB lib to project and included the USB.h but still get the
Undefined : "_mem_alloc_system_align"
error.
My previous post was not correct since there was a mismatch in the LDD names, so the code was not actually being linked. This is the repsonse I received from a sevice request that resolved the issue.
We made a quick analysis and there seem to be two problems: - The funtion _mem_alloc_system_align seems not to be present in latest MQX. So as the customer correctly observed, it's necessary to use _mem_alloc_align instead. - The _mem_alloc_align is available only if the BSP and PSP is recompiled with the option MQX_USE_LWMEM_ALLOCATOR set to 0. It should help adding #define MQX_USE_LWMEM_ALLOCATOR 0 to for example small_ram_config.h file, before this symbol is used." For a current workaround you can use "_mem_alloc_align", enable the allocator macro and recompile the BSP/PSP. Processor Expert team is getting more details on the best solution for these problems so that they get fixed for further releases of PExpert.
Hello,
the solution of the issue is here:
https://community.freescale.com/thread/100242
best regards
Vojtech Filip
Processor Expert Support Team