Experimental avionics




    Pilot assist

    Track assist

    Slip ball

    GPS summary

    Backtrack assist


    GPS Module


Device software

The software in the device consists of four parts, all of which are written in C:

  1. Software provided by ST Microelectronics for the STM32F10X family of microcontrollers. These are low-level routines and macros for accessing the devices in the microcontroller chip (GPIO ports, etc), and are version 0.3 dated May 2007.

  2. Software provided by Olimex for accessing the other devices on the development board. I use very little of this except for the display driver, which I have extended to add graphics routines (line draw, area fill, etc.). These are undated except that the file modification dates were generally 2007.

  3. General routines (not specific to avionics). For the sake of a name, I call these CortOS routines; these comprise:
    • Processor startup, C initialization, and utility routines
    • Accelerometer device and interrupt handler routines
    • GPS device and interrupt handler routines
    • GPS sentence parser
    • Geographic routines (e.g., for calculating the distance and bearing between two points)
    • Decimal arithmetic routines.

    These total about 3,200 lines (including both .h and .c files); much of this is device-independent.

  4. Avionics applications. These include a main routine and the four display applications described here, along with some test and measurement applications. These total about 1,500 lines (including both .h and .c files).

The device is entirely interrupt-driven, waiting for accelerometer data, GPS message bytes, and system ticks. The latter cause the current application to be called to update the display, currently 20 times each second. While waiting for interrupts the processor stops, which saves about half the power (with this in effect, the processor and all other components on the board take 15mA and the attached GPS module takes 35mA).

The support software is now in the process of being generalized and (where necessary) rewritten so it will run on a variety of processors and development boards, such as the mbed » board (which uses an LPC1768 microcontroller) and the Primer2 » (which uses an STM microcontroller). The new software is called Tollos », and is now available for download ».

Host software

On the host side, the Olimex board came with Eclipse and a number of other open source tools. I did get these to work, although they did not work “out of the box”. However, I did document my STK installation notes in case they might save others some time.

In the end I decided not to use Eclipse and just use command line tools: GCC for compiling and OpenOCD for flashing the microcontroller. The latter is poorly documented and unreliable, so I am looking for an alternative.

The tools are wrapped in a series of Rexx scripts for ease of use.

This website is compiled and maintained by Mike Cowlishaw; Please send me any corrections, suggestions, etc.
The pages and data here are for non-commercial use only. All text content © Mike Cowlishaw, 2011, except where marked otherwise. All rights reserved. Privacy policy: the Speleotrove website records no personal information and sets no ‘cookies’. However, statistics, etc. might be recorded by the web hosting service.

This page was last edited on 2011-01-29 by mfc.