Skip to content

Working with Eclipse

sofian edited this page Dec 12, 2011 · 3 revisions

Working with Eclipse

Working in Eclipse is a bit tricky. Here is how.

The build.sh script

The root directory contains a program called "build.sh". It basically does a "cd " and calls scons, which allows to compile sub-directory using scons (because scons doesn't support recursive building). Using build.sh you can either build the whole library (by calling "build.sh all") or a single sub-directory example (eg. "tests/example").

Usage

./build.sh <all|path/to/example> [<arguments>]

Examples

Build all: ./build.sh or ./build.sh all

Build "tests/examples": ./build.sh tests/examples

Build "tests/examples" for Arduino: ./build.sh tests/examples --arduino

Build "tests/examples" for Arduino Atmega328p: ./build.sh tests/examples --arduino MCU=atmega328p

Configuring Eclipse

  1. Select project properties
  2. Go in C/C++ Build:
  3. Under the Builder settings tab:
  • Build command: ${workspace_loc:/qualia}/build.sh
  • Build directory: ${workspace_loc:/qualia}
  1. Under the Behaviour tab:
  • Uncheck "Build on resource save"
  • Check "Build (incremental build)" and either add "all" (if you want to compile the library) or eg. "tests/polytope_simple" to compile a specific example

You should then be able to compile by cliking on the Build button.

Clone this wiki locally