Compile and Link: RP2350
Compile and link RTK-based programs for RP2350
Overview
This document describes how to compile and link RTK-based programs for RP2350. The process is the same without or with debugging.
After compilation and linking, the next steps will be:
-
for single-image programs (no S/NS):
- without debugging: Build & Load: RP2350
- with debugging: Build, Load & Debug: RP2350
-
for dual-image programs (S/NS):
- without debugging: Build & Load: RP2350 (S/NS)
- with debugging: Build, Load & Debug: RP2350 (S/NS)
Compile and Link
-
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.
-
IMPORTANT: please consult IMAGE_DEF.
-
The build process produces the following main files:
<program>.bin: raw binary<program>.uf2: the raw binary encoded in UF2 format<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>.uf2can be loaded onto the RP2350; it cannot contain DWARF debug data. Be aware of theIMAGE_DEFblock.<program>.binis the basis for creating an ELF file, which is the file format used to include DWARF debug data.<program>.mapis used by various utility programs to extract data about the program.<module>.lstare used as basis to create<module>.alstfiles, 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/pico2-rp2350-vXY, withXYbeing 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.
-
Secure code starts at 10000100H to leave 100H for the IMAGE_DEF metadata block prepended by
make-uf2ormake-elf. With Astrobe'sImageDefmodule, code starts at 10000000H.
Single Image (no S/NS)
| Region | Start | End | Size | Memory |
|---|---|---|---|---|
| Code | 10000100H | 10400000H | ~4 MB | Flash (XIP) |
| Data | 20000000H | 20040000H | 256 kB | SRAM0-3 |
256k of the RP2350's 512k main SRAM are reserved for the Core1 program; they are allocated by the corresponding start-up module MemMap. Any distribution among the cores is possible.
Dual Image (S/NS) – Without Flash Partitions
| Region | Start | End | Size | Memory |
|---|---|---|---|---|
| S code | 10000100H | 1007E000H | ~504 kB | Flash (XIP) |
| NSC veneers | 1007E000H | 10080000H | 8 kB | Flash (XIP) |
| NS code | 10080000H | 10100000H | 512 kB | Flash (XIP) |
| S data | 20000000H | 20040000H | 256 kB | SRAM0-3 |
| NS data | 20040000H | 20080000H | 256 kB | SRAM4-7 |
Dual Image (S/NS) – With Flash Partitions
| Region | Start | End | Size | Memory |
|---|---|---|---|---|
| S code | 10000100H | 1007E000H | ~504 kB | partition 0 |
| NSC veneers | 1007E000H | 10080000H | 8 kB | partition 0 |
| NS code | 10400000H | 10480000H | 512 kB | partition 1 (translated) |
| S data | 20000000H | 20040000H | 256 kB | SRAM0-3 |
| NS data | 20040000H | 20080000H | 256 kB | SRAM4-7 |
NS code is compiled at the QMI-translated virtual address (10400000H). The S image configures address translation so that the CPU fetches NS code from this range.
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