ECLIPSE setup for local build with full code analysis and debugging

In the FAQ documentation there is a tutorial to setup a local build environment and a second tutorial to setup Eclipse for debugging. The Eclipse tutorial explicitly mentions that the setup is only valid for debugging WITHOUT code analysis or auto-completion.

I tried enhancing this Eclipse setup by adding auto-completion and full code analysis but can’t seem to get it working. I tried to configure the CDT build output parser without much luck. It seems to detect header files and macro’s in building output, but the C/C++ indexer does not seem to make use of them. Rebuilding the index does not solve this.

I use windows and want to develop for Electron. After following both FAQ tutorials I have a working local build setup and working debugging in Eclipse.
A full code development environment with code analysis and debugging failed so far.

Anyone that tried this before me?

I thought I was unable to get C++11 mode in Eclipse to work, but in retrospect, I think I might have gotten the paths wrong.

Take a look at this post:

I got Intellisense to work in Microsoft Visual Studio. If you replicate all of the paths in that configuration in Eclipse, it may work.

Link firmware folder under project/paths and symbols/source location-> link folder

Under preprocessor include paths add/change to these. Rebuild index.
-CDT Cross GCC Built-in Compiler Settings
arm-none-eabi-gcc ${FLAGS} -E -P -v -dD -std=c++11 “${INPUTS}”
-CDT GCC Build Output Parser
Also select project under container for output parser.

This will give you complete codan and autocomplete without any red squiggly lines.

I’ll recommend using Atollic’s STM32 TrueStudio which is an Eclipse CDT tuned for STM32 development (the processor used by the Photon and P1).

I followed the Eclipse guide to set it up and it’s been great to use.

ok, thank you Ali,

This did it for me, finally working :).

1 Like