How to install gcc-arm-none-eabi for MinGW users? How to install gcc-arm-none-eabi for MinGW users? windows windows

How to install gcc-arm-none-eabi for MinGW users?


You can use MinGW for this; you just need to swap out the C++ toolchain for your chosen one. You can still invoke it from the MSYS console, and all your other tools will still work. There's nothing inherent to MinGW or MSYS that makes this "not supported".

Personally I install GCC 4.9 gcc-arm-none-eabi from launchpad.net, mount the toolchain's directory in MSYS then export the paths I need:

   mount 'C:\PROGRA~2\GNUTOO~1\4947E~1.920' /foo   mount 'C:\PROGRA~2\GNUTOO~1\4947E~1.920\ARM-NO~1' /foo_local

To discover the short name for the paths, write dir /X at the Windows command prompt. On my machine, the paths above are equivalent to the following, respectively:

  • C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2014q4
  • C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2014q4\arm-none-eabi

The mounting only needs to be done once; the export directives may be added to /etc/profile:

   export CPPFLAGS="-I/foo_local/include"   export CFLAGS="-I/foo_local/include"   export CXXFLAGS="-I/foo_local/include"   export LDFLAGS="-L/foo_local/lib -mthreads"   export PATH=".:/foo_local/bin:/foo/bin:/bin:/opt/bin"

Then just run g++.

Or of course you can skip all the export business and just invoke your chosen GCC directly:

/foo/bin/g++


If you're using MSYS2, MinGW compliance, you'll be able to install arm-none-eabi-gcc through pacmanYou can download it from here: https://www.msys2.orgFollow the instructions to properly setup the environments.Then use this commands below

pacman -S mingw-w64-x86_64-arm-none-eabi-gcc mingw-w64-x86_64-libwinpthread-git

now you'll also need to add this into PATH,

echo "export PATH=$PATH:/mingw64/bin" >> ~/.bashrcsource ~/.bashrc

Then, you can now call arm-none-eabi-gcc with the MSYS2 shell.See here for the details of this package https://packages.msys2.org/group/mingw-w64-x86_64-arm-none-eabi-toolchain


ELLCC is another option. You don't necessarily need mingw or mingw-64 installed to run it since it is statically linked. This post talks about using it to target Windows, but the same binary can also be used to target ARM and other processors. It's based on clang/LLVM though, not gcc.