HapticLib  0.7
Haptic Feedback Library for embedded systems
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Windows
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 using Windows Operating System.


Preliminary Setup

Before start using HapticLib you need to correctly prepare the system. Haptic applications and the library (including this documentation) are compiled using the provided Makefiles (refer to No IDE paragraph for explanations).
Therefore a version of GNU make.exe for Windows is necessary.

Furthermore some other Unix Tools are necessary to correctly execute all the operations defined in Makefiles:

  • bash.exe
  • rm.exe
  • mkdir.exe
  • cp.exe
  • mv.exe

For these reasons a more complete Unix Tools Package for Windows is suggested.
For example two tested packages are:

Note:
For Cygwin: there is no need to install everything, select only the basic, developer and library parts.

After choosing the preferred package, make sure the above commands are available in PATH.

Note:
Developers interested in building documentation must have in PATH Doxygen, LaTeX and ghost script tools. Please refer to Developer Guide for detailed informations.


Tool-chains supported

Now that the operating system is correctly setup, a tool-chain is needed to compile the code. Make sure the compiler collection binaries (arm-none-eabi-*) are available in PATH.

A list of tool-chains tested, divided by Platform kind, is provided.

ARM®

All the arm tool-chains are similar (all originates from gcc) and probably will work just fine.
The tested ones are:

Linaro - GCC ARM Embedded

Get the Linaro - GCC ARM Embedded tool-chain.

Atollic - TrueSTUDIO for ARM Lite

Get the Atollic - TrueSTUDIO for ARM Lite IDE that include tool-chain and gdb-server.

Note:
The executable downloaded can be extracted like a zip archive and then only the tool-chain folder (PATH_WHERE_EXTRACT\$_OUTDIR\ARMTools) can be token and used as is.
Warning:
Atollic tool-chain binaries are called arm-atollic-eabi-* instead of arm-none-eabi-*.

Mentor Graphics - Sourcery CodeBench Lite Edition

Get the Mentor Graphics - Sourcery CodeBench Lite Edition tool-chain.

Note:
With this tool-chain comes cs-make.exe and cs-rm.exe that can be used if preferred.

ARM - ARMCC toolchain

This toolchain comes with KEIL's uVision IDE. It works and is supported in HapticLib development. You can download here a ready to use uVision4 workspace with all it's needed.

Texas Instruments™ MSP430®

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

Microchip™ PIC32®

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

Atmel™ AVR32®

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


Flasher utilities

ST Microelectronics™ STM32VLDISCOVERY

For correctly attach and use this developing board to Windows based systems, drivers and flasher utility are needed.
Get the official ST Microelectronics - ST-LINK Utility package and install them.


GDB Servers supported

ST Microelectronics™ STM32VLDISCOVERY

Projects made for this dev-board can be debugged using gdb that include two elements: gdb-server and gdb-client. While the client is included in tool-chains (arm-none-eabi-gdb.exe), the server must be installed apart.
A gdb-server for Windows tested with this dev-board is provided by Atollic.
Get the Atollic - TrueSTUDIO for ARM Lite, extract the executable like a zip archive and take the folder PATH_WHERE_EXTRACT\Servers\ST-LINK_gdbserver .

Warning:
ST-LINK_gdbserver.exe doesn't work out of the box: some other tricks are needed:
  • Override STLinkUSBDriver.dll with the one that is provided by STM in ST-LINK Utility.
  • Ignore the ST-Link_V2_USBdriver.exe included. Those provided by STM in ST-LINK Utility must be used.
  • ST-LINK_gdbserver.exe must be invoked with -d parameter which enable SWD Debug mode.
  • The default listening port of the gdb-server is 61234 but can be changed invoking it with -p port_num parameter.


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 in linux using only the vim text editor, but every other text editor can be used too. The code was then compiled using GNU make which in turns uses the gcc toolchain to produce the binary code. In Windows refer to pre-requirements and tool-chain paragraphs. To flash the code on the device, texane/st-link was used. In Windows refer to flasher utility and/or gdb server sections. Finally to debug the gdb included in the toolchain was used; this last step is also valid under Windows.

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.

KEIL MDK uVision4

Even though KEIL's IDE doesn't support Makefile projects, HapticLib developers added support to uVision4 enabling development of haptic application with this tool. A ready-to-use uVision4 workspace is available here with all the demo application of HapticLib project.

Warning:
The IDE version tested is v4.60. Please make sure to have this version of KEIL's uVision installed along with ST-LINK Utility from STM.
Note:
HapticLib main development take place within a different platform than KEIL's. Some features are not available out-of-the-box using uVision4 IDE. It is still possible though to have DBG and REL versions of compiled applications.