USB LDD K40 link error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB LDD K40 link error

Jump to solution
2,007 Views
FredF
Contributor III

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.

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
1,668 Views
ProcessorExpert
Senior Contributor III

Hello,

 

the solution of the issue is here:

https://community.freescale.com/thread/100242

 

best regards
Vojtech Filip
Processor Expert Support Team

View solution in original post

0 Kudos
Reply
5 Replies
1,668 Views
hard_ware
Contributor III

Hello,

 

I got exactly the same error, I think its is related to the not included USB lib, but could not resolve it till now.

0 Kudos
Reply
1,668 Views
FredF
Contributor III

I was able to resolve the error by linking the USB libraries.  Thanks for the suggestion.

1,668 Views
hard_ware
Contributor III

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.

0 Kudos
Reply
1,668 Views
FredF
Contributor III

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.
0 Kudos
Reply
1,669 Views
ProcessorExpert
Senior Contributor III

Hello,

 

the solution of the issue is here:

https://community.freescale.com/thread/100242

 

best regards
Vojtech Filip
Processor Expert Support Team

0 Kudos
Reply