Undefined symbol __heap_based (referred from malloc.o)

06 Sep 2016

With the new mbed revision I got Undefined symbol errors.

Undefined symbol heap_based (referred from malloc.o)

Undefined symbol heap_limit (referred from malloc.o)

Undefined symbol initial_sp (referred from entry2.o).

See picture.

When I go back to the previous revision all compiles fine.

/media/uploads/xdeschain/error.png

/media/uploads/xdeschain/versions.png

Edit: I have never updatet the mbed code. This was the first time. After going back to previoius revision I can compile with the last revision. But the program hangs and have a strange behaviour with serial. Also in the previous revision. When I compile with the version from 07.Jul.2016 the program seems to be working fine. I use the Nucleo 411RE board. Then after testing 07.Jul.2016 revision I have gone back to the newest revison - without changing the code and when I use the serial line it hangs immediatly.

I use library classBufferSerial : public Serial. There is nothing special in. Only _buf = new unsigned char[ bufferSize ]; which maybe uses malloc???

Then I have another function which uses: cmd_tbl = (cmd_t *)malloc(sizeof(cmd_t)); char *cmd_name = (char *)malloc(strlen(name) + 1);

This problem is reproducable with my code. Every time I switch to the newst revison I get problems and serial is not working anymore. When I switch back to 07.Jul.2016 I got no problems.

22 Dec 2017

I am facing the same problem. Kindly tell us how did u evade this problem?