Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 9 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.
3 Answers
7 years, 6 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
7 years, 6 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, 9 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 02 Feb 2017Is this problem related to this one? https://developer.mbed.org/questions/76869/GR_Peach-libraries-broken/
posted by 03 Feb 2017I 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 03 Feb 2017For reference, this is the blinky example I used: https://developer.mbed.org/teams/mbed-os-examples/code/mbed-os-example-blinky/
posted by 03 Feb 2017
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