7 years, 2 months ago.

__wrap__free_r undefined with GCC

I have not used the online compiler for over a year, so maybe I have missed something, but I have checked all of the pertinent questions for answers and haven't found a solution.

I just made a new program online for GR-Peach using the 'blinky' example. I added a simple thread example to it and downloaded the code for GCC. In trying to make the program offline, I get several instances of 'wrapfree_r' and others undefined in the linker. I tried removing the '-Wl,wrap,_free_r' and similar lines from the LD section of the Makefile, but still no joy.

I noticed that the Makefile structure is now vastly different from that of a year ago.

Thanks in advance for any help with this.

Doh. Sorry, it works much better when you remove those '-Wl,- -wrap,...' parts from the LD_FLAGS section as well.

posted by Just Gary 02 Feb 2017

3 Answers

6 years, 11 months ago.

Hi Garry and Chris,

This is a "workflow bug" in our online tooling. It can take some time to convince the tools online that they should export very recent versions of mbed as mbed and not mbed-os. This generally only affects the most recent versions of mbed. As a workaround, you are free to remove the

-Wl,--wrap,_free_r

and similar from both the LD and LD_FLAGS variables.

We are working on an automatic mechanism to update the online tools knowledge of mbed releases when they happen.

Sorry for the inconvenience, -Jimmy

Accepted Answer
6 years, 11 months ago.

This bug is STILL unsolved. I can't understand how anyone is getting mbed to work at all other than using the on-line compiler.

7 years, 2 months ago.

Hello,

Can you share the code that you are having trouble with? It helps if I can recreate the issue you are seeing.

Cheers, Sarah

Actually, I can't easily share the code, but it should happen to you if you make a new "blinky" project with GR_Peach and download it for ARM-GCC.

posted by Just Gary 02 Feb 2017

Is this problem related to this one? https://developer.mbed.org/questions/76869/GR_Peach-libraries-broken/

posted by Just Gary 03 Feb 2017

I was not able to replicate this issue. Can you tell me the revision of mbed-os you are using?

Additionally, can you run:

arm-none-eabi-gcc --version 

and post the results?

posted by Sarah Marsh 03 Feb 2017

For reference, this is the blinky example I used: https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-blinky/

posted by Sarah Marsh 03 Feb 2017