How to use GNU ARM binutils for cortex-M4? When I try to compile with -mcpu=cortex-M4 -march=armV7e-m I get 'bad value in switches'.
This reply is really for jvanmont. In your specific case, the following has worked for me (on a RPi!): * lowercase commandline * -mcpu=cortex-m4 * -march=armv7-m. You might even get away without the -march option. GCC V4 does not sopport the Cortex -M4; I don't know about GCC V5 (was it ever released?), but any version from v6 onward will. And the GCC Linker automatically generates ELF output. The best ( but most long-winded!) source of information here is the series "Using the GNU Compiler Collection" - there is one for each version of GCC.