STM32 bindings for Ada language: register descriptions, startup routines etc.
Go to file
Vovanium 3e01c9b7dc * example generalization 2021-08-03 19:15:58 +03:00
examples * example generalization 2021-08-03 19:15:58 +03:00
library * clear library variants: there is single library for a family (F4) now 2021-07-29 19:23:11 +03:00
objects * clear library variants: there is single library for a family (F4) now 2021-07-29 19:23:11 +03:00
source * clear library variants: there is single library for a family (F4) now 2021-07-29 19:23:11 +03:00
.gitignore + Ignore gnatprove output 2021-07-15 19:42:09 +03:00
LICENSE Initial commit 2019-01-15 21:23:45 +03:00
Makefile * clear library variants: there is single library for a family (F4) now 2021-07-29 19:23:11 +03:00
README.md Do not need separate type for address register 2021-07-29 17:32:46 +03:00
stm32f4_library.gpr * clear library variants: there is single library for a family (F4) now 2021-07-29 19:23:11 +03:00

README.md

stm32-ada

Ada bindings for STM32 internals

Design directions

Compiler implication

System.Address should be standard 32 bit byte address as in CPU registers and peripherals (DMA etc.).

Hardware quirks and workarounds

APB

APB does not support writes of parts of 32-bit registers. The library provides acess to register fields as records. This could lead compiler to emit byte and half-word writes to APB registers causing erroneous effects. As a workaround those registers should be read to local variable, this variable altered, and then written back to hardware. GNAT users may not need the workaround, because of its pragma Volatile_Full_Access used in this library.

Compiler specific notes

There are compiler-specific pragmas so your compiler may complain about them.

GNAT

Volatile_Full_Access pragma is used on (at least writable) APB registers as byte- and half-wide writes are not supported by APB. Read STM docs on what those accesses actually do.

Currently GPR cannot manage aggregate projects for different targets. GNU Make script is used to build whole set of libraries instead.