Eclipse - thingsee/thingsee-sdk GitHub Wiki

Setup Eclipse IDE

Download

Download Eclipse IDE for C/C++ Developers from https://eclipse.org/downloads/eclipse-packages/

Version used in this example

Version: Neon Release (4.6.0) Build id: 20160613-1800

Install

$ sudo tar xvfz eclipse-cpp-neon-R-linux-gtk-x86_64.tar.gz -C /opt/

Add to path

$ echo 'PATH="/opt/eclipse:$PATH"' >> $HOME/.profile
$ source $HOME/.profile

Create thingsee-sdk project in Eclipse

Start Eclipse

$ eclipse &

Close the Welcome window. From the menu, select

File->New->Makefile Project with Existing Code

Fill the dialog as below (replace the Code Location path) and click Finish.

Configure building in Eclipse

Select the thingsee-sdk project from the Project Explorer and select

File->Properties

Under C/C++ Build, change

Build command: make
Build directory: ${workspace_loc:/thingsee-sdk}/nuttx

Install GNU ARM Embedded Eclipse plugin

Select

Help->Eclipse Marketplace...

Type "GNU ARM Eclipse" in the find field

Click Install to install the GNU ARM Eclipse plugin

Select the required components

Click Confirm

Accept the license agreement and click Finish

Click OK on the unsigned content dialog

Click Yes to re-start Eclipse.

Configure debugging in Eclipse

Open Debug perspective:

Window->Perspective->Open Perspective->Debug

Open Debug Configurations:

Run->Debug Configurations...

Create new GDB OpenOCD configuration:

  • Right click "GDB OpenOCD Debugging"
  • From the context menu, select "New"

Main tab

  • To select a project, click Browse... and select thingsee-sdk and Click OK
  • To select a C/C++ Application, click Search Project... and select nuttx (This requires that you have compiled the code earlier)

Debugger tab

Set executable: openocd
Set Config options: -f -f interface/olimex-arm-usb-ocd-h.cfg -f target/stm32l1x_dual_bank.cfg
Set GDB Client Executable: arm-none-eabi-gdb

Startup tab

Uncheck Enable ARM semihosting
Uncheck Pre-run/Restart reset

Add custom commands:
	monitor reset halt

Uncheck Set breakpoint at or set it to some function you want to examine at startup

Click Apply and Close