-
Notifications
You must be signed in to change notification settings - Fork 11
Eclipse
Maciej T. Nowak edited this page Nov 17, 2016
·
7 revisions
- Download Eclipse C++ (http://www.eclipse.org/downloads/)
- Create
buildfolder as sibling to source folder - Go to
buildfolder - Run
cmake -G "Eclipse CDT4 - Unix Makefiles" <path to source folder>(useEclipse CDT4 - MinGW Makefileson Windows) - In Eclipse, select Import...,
- Select General -> Existing project into workspace, click Next
- Select root directory: build folder
- In Projects select PWSat2
- Click Finish
Now project is imported into Eclipse. Make targets are available in 'Make targets' view. 'Build project' action invokes make all. Source files are visible under [Source Directory] in Project Explorer.
- Install
GNU ARM C/C++ JLink Debuggingfrom update site http://gnuarmeclipse.sourceforge.net/updates - Open Debug Configurations
- Create new __GDB Segger JLink Debugging`
- In C/C++ Application select
build\<platform>\bin\pwsatfile - On Debugger tab enter path to
JLinkGDBServerCL.exefile - In Device name enter
EFM32GG990F1024 - In GDB Client Setup -> Executable enter path to
arm-none-eabi-gdbfrom GCC toolchain
Unfortunately CMake is not able to generate proper .cproject file and C++ indexer in Eclipse thinks that code is using C++98 standard. That decision in based on __cplusplus value put in .cproject by CMake. Changing that value to 201402L will not work as project files are regenerated during build. Fortunately it is possible to instruct Eclipse to detect compiler settings (including __cplusplus by itself).
- Go to Window -> Preferences -> C/C++ -> Build -> Settings and go to Discovery tab
- Select CDT GCC Built-in Compiler Settings Cross ARM [Shared]
- Edit Command to get compiler specs to match:
<toolchain path>\bin\arm-none-eabi-${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}" -std=c++14 - Click OK
- Open project properties: Project -> Properties -> C/C++ General -> Preprocessor Include Path, Macros etc
- Check CDT GCC Built-in Compiler Settings Cross ARM [Shared] entry and check Use global provider shared between projects
- Move CDT GCC Built-in Compiler Settings Cross ARM [Shared] **above **Contributed PathEntry Containers [Shared]
- Close project properties by clicking OK
Solution based on StackOverflow answer: http://stackoverflow.com/a/24561615/995351
pw-sat.pl | radio.pw-sat.pl | Twitter | Facebook | Instagram