Oberon RTK

Compile and Link: STM32

Compile and link RTK-based programs for STM32

Overview

This document describes how to compile and link RTK-based programs for STM32. The process is the same without or with debugging.

After compilation and linking, the next steps will be:

  • Tested with Astrobe for RP2350, v10.0.2.

  • Programs can be built using

    • the Astrobe IDE, or

    • the Astrobe command line programs

      • AstrobeCompile
      • AstrobeLink
      • AstrobeBuild
  • A complete build runs AstrobeBuild then AstrobeLink:

    • AstrobeBuild recursively compiles a module together with every module it imports; modules are only compiled as needed;

    • AstrobeLink produces the binaries and the map.

    • In the IDE, both steps are combined via menu Project > Build or Project > Rebuild.

  • Refer to the corresponding documentation for instructions.

  • The build process produces the following main files:

    • <program>.bin: raw binary
    • <program>.uf2: the raw binary encoded in UF2 format; this file cannot be used for STM32
    • <program>.map: human-readable data about modules and address ranges
    • for each module:
      • <module>.smb: symbol file
      • <module>.arm: relocatable object file
      • <module>.lst: listing file (source and assembly code, in the relocatable stage, that is, before addresses are resolved)
  • Usage:

    • <program>.bin is the basis for creating an ELF file, which is the file format used to include DWARF debug data, but also to load a program without such debug data
    • <program>.map is used by various utility programs to extract data about the program.
    • <module>.lst are used as basis to create <module>.alst files, which form the basis to extract DWARF debug data.
  • The command line programs are used in build scripts. On Windows, they are located in the Astrobe program installation directory. For macOS, see Astrobe on macOS.

Configuration Files

Configuration files for Astrobe (.ini) contain two major blocks (among other data):

  • code and data address ranges
  • the library search path

The configuration files provided in the repository are in:

  • <repo>/config/astrobe-rp2350/u585i-iot-vXY (STM32U585)
  • <repo>/config/astrobe-rp2350/h573i-dk-vXY (STM32H573)

with vXY being the library version.

Address Ranges

  • These are the commonly used address ranges as used by most test and example programs.

  • Without Secure/Non-secure segregation, all code is Secure.

  • Unlike the RP2350, both MCUs use Secure and Non-secure address range aliases.

Single Image (no S/NS)

Secure aliases are used.

Region Start End Size MCU Memory
Code 0C000000H 0C100000H 1 MB both Flash (S alias)
Data 30040000H 300C0000H 512 kB U585 SRAM3
Data 30050000H 300A0000H 320 kB H573 SRAM3

Dual Image (S/NS) – STM32U585

Both Secure and Non-secure address aliases are used.

Region Start End Size Memory
S code 0C000000H 0C0FE000H ~1016 kB Flash (S alias)
NSC veneers 0C0FE000H 0C100000H 8 kB Flash (S alias)
NS code 08100000H 08180000H 512 kB Flash (NS alias)
S data 30000000H 30030000H 192 kB SRAM1 (S alias)
NS data 20040000H 200C0000H 512 kB SRAM3 (NS alias)

Dual Image (S/NS) – STM32H573

Both Secure and Non-secure address aliases are used.

Region Start End Size Memory
S code 0C000000H 0C0FE000H ~1016 kB Flash (S alias)
NSC veneers 0C0FE000H 0C100000H 8 kB Flash (S alias)
NS code 08100000H 08200000H 1 MB Flash (NS alias)
S data 30000000H 30040000H 256 kB SRAM1 (S alias)
NS data 20050000H 200A0000H 320 kB SRAM3 (NS alias)

Note: the NSC veneer addresses are not part of the configuration file.

Library Search Path

The library search path in your configuration files depends on the installation of Oberon RTK. It must include all relevant directories of Oberon RTK, as well as Astrobe's own framework.

Last updated: 12 May 2026