I am trying to build my project with the gcc compiler, but I get this error:
gcc: error: unrecognized command line option '-mthumb'
Isn't -mthumb
a default option for gcc?
output of gcc --version
:
gcc (GNU Tools for ARM Embedded Processors) 4.8.4 20140526 (release)
[ARM/embedded-4_8-branch revision 211358]
make
version is 3.81
I am building with make
version 3.81 for the Cortex-M4 architecture.
-mthumb
is documented for GCC 4.4 and 8.2. Perhaps posting the command line would have helped, in case the options has become entwined in some other context?make
in his case, @simon.watts? I got the same error when trying to compile an ARM project on an x86 GCC, as this is an ARM specific option.make
issue -- that would often exhibit as empty variables (expansions from missing make functions - run with--warn-undefined-variables
). I was just checking when the-mthumb
option was added to GCC, and it certainly predates 4.8.4. I would question whether there is something different in the ARM branch compared to baseline, or whether its possible the option appeared on the command line where something else was expected (such as a parameter to a preceding option, or similar).