3e01c9b7dc | ||
---|---|---|
examples | ||
library | ||
objects | ||
source | ||
.gitignore | ||
LICENSE | ||
Makefile | ||
README.md | ||
stm32f4_library.gpr |
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.