installation on apple macbook

Asked by henk gescher

how to install the gnu tools on apple macbook

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Terry Guo
Solved:
Last query:
Last reply:
Revision history for this message
Best Terry Guo (terry.guo) said :
#1

Firstly download the Mac toolchain package from https://launchpad.net/gcc-arm-embedded/4.8/4.8-2013-q4-major/+download/gcc-arm-none-eabi-4_8-2013q4-20131218-mac.tar.bz2, then decompress it in a proper place like your home folder, the decompression command can be "tar xf gcc-arm-none-eabi-4_8-2013q4-20131218-mac.tar.bz2". Finally you can invoke the tool chain in two ways:
1) directly using its path like "./gcc-arm-none-eabi-4_8-2013q4-20131218/bin/arm-none-eabi-gcc -O2 -S test.c".
2) suppose the tool chain is decompressed in home folder like /User/terry, add the path to toolchain to global PATH variable with command "export PATH=/User/terry/gcc-arm-none-eabi-4_8-2013q4-20131218/bin:$PATH". Now we can use tool chain just by "arm-none-eabi-gcc -O2 -S test.c".

Revision history for this message
henk gescher (henk-gescher) said :
#2

Hi Terry,

Thanks for the clear answer, it works.
Can you please explain what the options -O2 and -S do?

Thanks again,
Henk

Revision history for this message
Terry Guo (terry.guo) said :
#3

Those are the options of the compiler gcc. The GCC website provides very detailed introductions to them. The URL is http://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/Option-Index.html#Option-Index. You can get official explanation there. If you have any question to understand them, feel free to ask here.

BR,
Terry