When people talk about a bare-metal library for Raspberry Pi, they usually mean a framework or set of low-level drivers (UART, GPIO, timers, etc.) that let you write code without Linux or any OS—just your program running directly on the hardware.

Here are some of the main options depending on your Raspberry Pi model and needs:

1. Circle (C++ bare-metal framework)

What it is: A popular C++ bare-metal environment for Raspberry Pi (supports Pi 1–4).

Features:

Drivers for UART, GPIO, SPI, I²C, USB, sound, networking (even TCP/IP).

Includes build s and examples.

Actively maintained for modern Raspberry Pi boards.


2. Ultibo (Free Pascal + RTL)

What it is: An environment using Free Pascal to write bare-metal apps for Raspberry Pi.

Features:

Comes with its own runtime and drivers.

Feels like writing a small embedded OS in Pascal.

Has networking, file system, and graphics support.


3. Baking Pi (Educational asembly + C)

What it is: A tutorial series by Cambridge University for learning ARM asembly on Pi.

Features:

No “real” library, but step-by-step guides to writing your own.

Great for learning the fundamentals (boot, MMIO, UART).


4. Raspberry Pi Pico SDK (if using RP2040 microcontroller)

What it is: For Raspberry Pi Pico (not Pi boards with Broadcom SoCs).

Features:

Provides C/C++ SDK with hardware access (GPIO, timers, USB, etc.).

Not strictly bare-metal since it ships with a minimal runtime, but close.


5. Roll-Your-Own (libpi / custom drivers)

If you want absolute control, you can build your own mini “library” by:

Using the official BCM2835 ARM Peripherals Manual.

Writing MMIO-based drivers for UART, GPIO, timers, etc.

Link with a cross-compiler (arm-none-eabi-gcc).

Many tutorials exist, like Valvers Pi tutorials.

Would you like me to:

Recommend which one fits your goal (learning vs. building a project)?

Show you a minimal example (e.g., “Hello World” over UART on bare metal)?

Or make you a starter library (C or C++) for GPIO and UART so you can build on it?

Which direction are you going—learning or practical project development? Or both?


"도둑은 집을 떠나며 주인을 욕한다" - 러시아 속담
송대관-해뜰날
https://youtu.be/DUsVXmywSCk