HapticLib  0.7
Haptic Feedback Library for embedded systems
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Linux
Note:
This page is directed to developers of haptic applications on embedded platforms.

Here is explained how to setup the development environment in different configurations on Linux Operating System.

Preliminary Setup

Before start, make sure the system provide basic GNU development tools like autotools. Most linux distributions include such tools. Target code compilation is managed using Makefiles that, along with the tool-chain, is the only tool needed to produce code. However, in order to debug application, a gdb-server interfacing with the Hardware target device is needed. To produce code documentation a recent version of doxygen is used. The following section will explain all the single components used in the development work flow.

Tool-chains supported

The tool-chain used in HapticLib development is linaro gcc targeting ARM Cortex-M3 platform, compiled locally using a user-friendly script.

ARM

At the moment the ARM platform is the only one supported. In particular the only physical target board used has a Cortex-M3 MCU. Any gcc-derived toolchain should work without problem, but only linaro tool-chain has been tested.

linaro

The linaro gcc tool-chain has been locally compiled using the building script summon-arm-toolchain. It just download all the software components from their respective web-sites and then compiles everything inside a target directory holding the toolchain (including newlib C library and gdb). At the end of the building process, you can just add the resulting bin/ path to the system $PATH and the tool-chain's tools will be available.

codesourcery

This toolchain has not been tested, but it should work just fine.

MSP430

At the moment the library dooesn't support this embedded platform. Probably there should not be any problem porting HapticLib to it.

PIC

At the moment the library dooesn't support this embedded platform. Probably there should not be any problem porting HapticLib to it.

GDB Servers supported

The gdb server interfacing with the only dev board (STM32VLDISCOVERY) used during HapticLib development was texane/stlink. It is an open source gdb server capable of flashing/erasing flash memory, and debugging running code using stlink protocol with the device and gdb protocol with the gdb client from the toolchain.

Flasher utilities

To flash binary code to the target device (STM32VLDISCOVERY) texane/stlink was used. (see GDB server section).

IDE supported

No IDE

The library is versatile enough to be used without a complete IDE; in fact you can compile the application and the library (including this documentation) using the provided Makefiles.

The first versions of HapticLib with the demo applications (up to v0.2) were developed on linux using only the vim text editor. The code was then compiled using GNU make which in turns uses the gcc toolchain to produce the binary code. To flash the code on the device, texane/st-link was used. Finally to debug the gdb included in the toolchain was used.

Eclipse

Eclipse IDE allow the user to create a Makefile based project. Starting with v0.2 development has been done with Eclipse, offering user-friendly integrated features like CVS and debugging. Still, the use of an IDE is optional. Makefile building system is still at the core. Some fine-tuning were necessary to make the debugger work inside Eclipse.