17. Eclipse and GCC
In addition to the Keil toolchain, SDK6 also supports the use of GCC in conjunction with the Eclipse IDE. The SmartSnippets™ Studio development platform contains the Eclipse CDT IDE and GCC toolchain, and should be installed before proceeding:
17.1. Using the Eclipse IDE and GCC Toolchain
The SDK contains a sample application which has an Eclipse project file, allowing it to be built using the GCC toolchain. This project can be found in the following folder:
The instructions below describe how to build and run this sample application using the Eclipse IDE and GCC toolchain.
17.1.1. Building the Example
Start SmartSnippets Studio, and when prompted set the workspace location to be the sdk root directory, then press “Launch”.
Start the Eclipse IDE by clicking on the icon highlighted in the diagram below.
Now import the
prox_reporterproject. To do this, click on the Import Projects link in the Project Explorer window, select the Existing Projects into Workspace option, and then press Next.
Next, use the Browse button to navigate to the <sdk_root_directory>/projects/target_apps/ble_examples/prox_reporter/Eclipse folder. Finally, press the Finish button to import the project into the Eclipse IDE.
To build the
prox_reporterproject, click on the arrow next to the build icon and select the appropriate target (DA14531, DA14585 or DA14586).
Once the build is complete the following output will be displayed in the console window.
17.1.2. Debugging the Example
Once the build is complete the sample application can be loaded into RAM, and executed under the control of the debugger, as follows:
To start the debugger, click on the arrow next to the debugger icon and select appropriate target.
If you get the following error message, jump to step 5, otherwise continue to step 3.
When prompted, switch to the Debug perspective by pressing the Switch button.
Finally, start execution of the
prox_reportersample application by pressing the Resume button.
In some versions of SDK6 there is an error with
prox_reporterproject configuration. The debugger is expecting a file named
prox_reporter.elf, however the output of the build is a file containing the target within the name i.e.
prox_reporter_531.elf. To resolve this issue we must change the build output to match the debugger configuration. To do this, right click on the
prox_reporterfolder in the Project Explorer window and select Properties.
Next, expand the C/C++ Build tab and select the Settings option. Select the Build Aritfact tab and remove the target extension from Artifact name, in this case we are removing the “_531” extension. Press the Apply and Close button to apply the changes, rebuild the example and then restart the debugger as described in step 1.