I am using codewarrior MCU 10.4 , mqx4.0, k20d72m board ,EWL
I am attaching my program(cplus.cpp) , I need to use new in constructor then create a global object of class , when I do this my code crashes
I tried to edit the startup but my changes doesn't come to effect (when debugging the debugger goes into the commented function )
what are the steps to edit startup.c ?
(I tried to comment " bl __call_static_initializers " )
then I tried to give static heap by adding
"
__SP_INIT = . + 0x00004000;
__heap_addr = __SP_INIT;
__heap_size = 0x00004000; "
to my linker file but it didn't work I am attaching my linker file (un edited one ).
how can I add static heap to this linker file what are the changes to be made ?
Original Attachment has been moved to: cplus.cpp.zip
Original Attachment has been moved to: intflash.lcf.zip
Hi Joseph,
It would be helpful to know what are you trying to achieve, could you give us more information? do you want to use the malloc() function in your MQX project?
Best Regards,
Carlos Mendoza
Technical Support Engineer