How do I install gcc-arm-none-eabi for MinGW users?

I'm interested in taking my C ++ program and rewriting it into something that can run on an ARM MCU. For this I need to install gcc-arm-none-eabi

. I'm on a Windows 7 machine right now, so I installed GCC / make / g ++ / etc. via MinGW.

From the research I have done, it looks like MinGW does not support this toolchain, which leads me to think Windows-based ARM development is not possible. So my question is: How do I use MinGW to install the language binding gcc-arm-none-eabi

locally?

+3


source to share


2 answers


You can use MinGW for this; you just need to change the c ++ toolkit for the one you choose. You can still call it from the MSYS console and all your other tools will still work. There's nothing inherent in MinGW or MSYS that makes it "not supported".

Personally, I install GCC 4.9 gcc-arm-none-eabi from launchpad.net , mounts the toolchain directory in MSYS, then exports 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 find the short name for the paths, write dir /X

at the Windows command prompt. On my machine, the above paths are equivalent as follows:

  • 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



Installation only needs to be done once; directives export

can 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 the whole export business and just call your selected GCC directly:

/foo/bin/g++

      

+2


source


ELLCC is another option. You don't need to have mingw or mingw-64 installed to run as 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 is based on clang / LLVM, although not gcc.



0


source







All Articles