mbedmicro/mbed — pull request #435 by janekm (2014-08-10 23:38:20+00:00)
Title: fixes to NRF51822 GCC template

I have been experimenting with getting mbed projects compiled & linked with GCC. This fix allows me to compile & link the blinky example (exported with "export_test.py" from worspace_tools), and execute it successfully (so far tested using JLinkGDBserver, I'll try pyOCD next).

--wrap=main is required as common/retarget.cpp needs to wrap main. With --gc-sections I seem to get some needed sections dropped by LD (and the code doesn't run correctly) so I took it out for now. (-Map=out.Map can be used to see what the linker is doing).