In Project > Properties > C/C++ General > Preprocessor Include Paths > Providers
:
Enable CDT GCC Built-in Compiler Settings Cross ARM
.
Set Command to get compiler specs
to:
arm-none-eabi-g++ ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}".C
- The important part is the
.C
on the end. This is usually set depending on the language. A small .c
is used for C code, while the big C is used for C++. But there are no languages specified when using an external makefile or with the no toolchain
option set.
Also, check Allocate console in the Console View
to check the command is running properly and the variables are being correctly substituted.
Enable CDT GCC Build Output Parser
and change the compiler command pattern from (gcc)|([gc]\+\+)|(clang)
to (.*g++)|(.*gcc)|(.*[gc]\+\+)
then apply changes. Use the Move up/down
buttons to move it above the CDT GCC Built-in Compiler Settings Cross ARM
.
You will also need to set Project > Properties > C/C++ General > Preprocessor Include Paths > Entries > CDT User Settings Entries
to the following:

In Preferences > String Substitutions
you will need to create a var for gnu-arm-path
pointing to your toolchain home.
Ideally, these should be found in CDT GCC Built-in Compiler Settings Cross ARM
, but in my case they are not. I think it is to do with the fact that in a managed project, these entries are tied to each language. But with an external makefile the languages list box just says [Unspecified]
.
The Eclipse scanner provider system seems to be designed around CDT managed projects, making it a little trickier to get working when you are using an external makefile.
You can create a new managed project with an external makefile and view the scanner discovery console to see how it should be working. This is what I did.