Skip to content

itafraze/Alire-Crate-STM32L0xx-LL

Repository files navigation

Alire Crate - STM32L0xx LL

This repository provides the low-layer drivers library for the STMicroelectronics STM32L0 MCU series and is intended to be distributed via the Alire package manager. This library, ported from C to Ada, is based on the following projects:

Table 1. Credits
Project Version

STMicroelectronics’s STM32CubeL0 HAL Driver MCU Component

v1.10.6

Repository structure

Table 2. Content
Path Description

src/

Library source files

tests/

Library test subproject

share/

Utilities shared with Alire projects using this one

Support status

Development of this library has started to support the STM32L011D4 MCU. Despite efforts to port the entire STMicroelectronics cmsis_device_l0 project from C to Ada, support for the entire family cannot yet be guaranteed due to lack of testing.

Table 3. Supported drivers
Driver Status Details

ADC

BUS

COMP

CORTEX

CRC

CRS

DAC

DMA

EXTI

GPIO

I2C

IWDG

LPTIM

No get functions, no encoder mode

LPUART

PWR

RCC

RNG

RTC

SPI

SYSTEM

TIM

USART

UTILS

WWDG

Development

Requests and reporting

Please report bugs or feature requests to the project maintainers, preferably using the issues tracker.

Workflow

The main development takes place on the develop branch. Small, self-contained updates can be committed directly to the develop branch, while more impacting one should have dedicated feature branches.

Alire aliases

Alire aliases can be configured to simplify frequent toolchain operations, especially if involving the .gpr project file or environment variables provided by Alire. Script file make-aliases.sh is provided to configure the following aliases:

  • alr emu: (tests subproject) Execute tests in emulated environment.

This alias uses GNATemu, hence it requires arm-eabi-gnatemu to be available in $PATH. At the time of writing, it is not available through Alire. However non-GNATPro users may still find available ARM ELF GNAT Community Edition, which ships also the arm-eabi-gnatemu binary, at AdaCore’s Download page.

Tests on emulated target

The target platform can be emulated using GNATemu. Sub-crate project tests/tests.gpr supplies the Emulator package with minimal working configuration. To run tests in the emulated environment, execute from within the sub-project folder the following command.

Start tests in emulation environment
$ alr emu

License

Licensed under the Apache License, Version 2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.