HapticLib
0.7
Haptic Feedback Library for embedded systems
|
Here is explained how to setup the development environment in different configurations on Linux Operating System.
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.
The tool-chain used in HapticLib development is linaro gcc targeting ARM Cortex-M3 platform, compiled locally using a user-friendly script.
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.
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.
This toolchain has not been tested, but it should work just fine.
At the moment the library dooesn't support this embedded platform. Probably there should not be any problem porting HapticLib to it.
At the moment the library dooesn't support this embedded platform. Probably there should not be any problem porting HapticLib to it.
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.
To flash binary code to the target device (STM32VLDISCOVERY) texane/stlink was used. (see GDB server section).
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 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.