This project provides Ada/SPARK drivers to control the on-board peripherals of the DecaWave EVB1000 evalulation board. The drivers are implemented in Ada, but the package specs have SPARK annotations to allow the drivers to be used by SPARK code. The library provides drivers for:
- the two-line ASCII LCD;
- the four user-controllable LEDs;
- switches 3 .. 8 on the S1 switch.
- USB communication through the micro-USB connector on the EVB1000.
The LCD and USB drivers use protected objects to manage shared access between multiple user tasks. Therefore, this library requires an Ada runtime which supports tasking, such as a Ravenscar runtime.
These drivers are built as a library named libevb1000.a
, targeted to
the STM32F105 Cortex-M3 microcontroller, which is the host processor on the
EVB1000 board. You can also include the sources directly into your project.
This library also includes the peripheral register definitions for the STM32F105, generated by SVD2Ada.
To build the library, change to the repository root directory and type:
make build
You can optionally specify a different runtime system (RTS) to use (the default
is ravenscar-full-stm32f105
):
make build RTS=ravenscar-sfp-stm32f105
To install the Ada library to the directory <destination>
change to the
repository root directory and type:
make install DESTDIR=<destination>
Alternatively, you can copy/include the source code directly into your project
by including all of the source files in the src
and usb
directories.
You can refer to the example project file usb_echo.gpr
in the examples/usb_echo
directory to see how to compile and link from source files.
If you don't need USB functionality then you can exclude the usb
directory
and the files src/evb1000-usb.ads
and src/evb1000-usb.adb
from the build.
This library is licensed under the MIT license.