In this directory you will find instructions and examples to start your first Ada_Drivers_Library project.
The goals of the examples are:
- Offer a simple way to start a project
- Demonstrate the supported features of the boards
- Demonstrate the supported drivers of a micro-controller family
The examples are sorted by boards but some of them are working on multiple boards, in that case the code is stored in the shared directory.
Most of the boards/micro-controller supported are based on the ARM Cortex-M architecture. If you have a GNAT Pro subscription, you can download the compiler (GNAT) and IDE (GNAT Programming Studio) from your account. Otherwise, there are GNAT FSF and GPRbuild releases from the Alire project that you can download here.
A public release of GNAT Studio is also available here.
For the STM32 board we recommend to use the open-source probe interface stlink.
On Windows, you can get it from the Msys2 package manager.
On Linux, you have to download the source and compile the tool:
$ git clone https://github.com/texane/stlink.git
$ cd stlink
$ make release
Some boards require a specific tool or configuration, in that case you will find the additional instructions in the example directory dedicated to this board (for instance Micro:bit).
If you are on Windows, we recommend to use the GitHub Desktop application.
Otherwise, from the command line:
git clone --recursive https://github.com/AdaCore/Ada_Drivers_Library.git
Start GNAT Programming Studio and open one of the project supported by the board you have:
- HiFive1
- MicroBit
- OpenMV2
- STM32F429_Discovery
- STM32F469_Discovery
- STM32F4_DISCO
- STM32F746_Discovery
- STM32F769_Discovery
- stm32f4xx_m
Use the "Build all" button in GNAT Programming Studio tool bar.
For the STM32 board, use the "Flash to board" button in the tool bar.
If you notice an error in these instructions, or if you want to improve them, please go to Ada_Drivers_Library GitHub repository. Thank you in advance.