I just tried exporting a basic HelloWorld sample using these Handbook instructions for GCC ARM Embedded. and got it to work after a few modifications...it didn't just work out of the box due to recent changes in the mbed library.
First of all, the easiest way to get a GCC toolchain for OS X, is to install the latest 4.7-2012-q4-major release which includes this archive for OS X: https://launchpad.net/gcc-arm-embedded/4.7/4.7-2012-q4-major/+download/gcc-arm-none-eabi-4_7-2012q4-20121208-mac.tar.bz2. Once you download this archive, you will want to extract its files and then place the /bin directory within it to your PATH so that the makefile can find the tools like arm-none-eabi-gcc, etc.
After exporting using the Handbook steps, I extracted its files and then had to update one line in its makefile. The following diff shows where I added -lnosys to the LD_SYS_LIBS variable.
diff --git a/Makefile b/Makefile
index fd15d03..d18ad0e 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ AS = $(GCC_BIN)arm-none-eabi-as
LD = $(GCC_BIN)arm-none-eabi-gcc
LD_FLAGS = -mcpu=cortex-m3 -mthumb -Wl,--gc-sections
-LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc
+LD_SYS_LIBS = -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
OBJCOPY = $(GCC_BIN)arm-none-eabi-objcopy
If you hit any issues going through this process, give me as much information about the errors that you hit and I will try my best to help.
-Adam
I have been trying to get an offline compiler / toolchain working for my mbed. I have read lots and lots of threads here and i have tried various scripts to build gcc and the rest of the tool chain and in the main these result in a toolchain which will compile but will not link. This is with even the most simple of programs.
Is there a set of instructions anywhere that i can follow or if anyone has this working could you please give me a few pointers..
I am running OS X 10.8.2.
Kind Regards,
Steve