can we use malloc before mqx_init

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

can we use malloc before mqx_init

910 Views
josephxavier
Contributor III

can we use malloc before mqx_init in mqx 4.0

0 Kudos
Reply
2 Replies

644 Views
igorpadykov
NXP Employee
NXP Employee

Hi welwin

please look at attached MQX Guide, FAQ sect.6.3 Global Constructors

describing malloc usage.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

644 Views
josephxavier
Contributor III

Initialize the constructors from (in init_bsp.c),

which MQX calls after it

initializes the memory management component.

is the solution that u proposed .

I tried to edit the start up .c but couldn't . eventhough I edited ,saved and build BSP ,PSP and project.

while debugging it again goes to static initializer for cpp which I had commented .

so could u share the steps to edit the startup.c in mqx project and bring it to effect .

I also tried to allocate static heap in linker, can this problem be over come by that method . can u share the steps while using fresscale compiler and ewl lib

0 Kudos
Reply