Programming a raspberry pi without linux

I was wondering if anyone had experimented with using a raspberry pi without an OS, just as a (very powerful) controller. You could then use something like RTFM to write your application.

My search so far:

  1. Found rust-raspi3-OS-tutorials, had a look through and see that it hard-codes the register addresses of peripherals, e.g. 03_uart1/src/
  2. Wonder if there is a device crate for the bcm2837 (I'm using a pi3) - there isn't
  3. Had a look to see if there is some kind of specification of register locations etc. The best I can find is dtb files (e.g. firmware/boot at master · raspberrypi/firmware · GitHub) that seem to specify peripheral locations. Can I parse these like you would parse svd files?

But now I feel a bit stuck. Does anyone have any suggestions?

1 Like

You might want to follow this chap on the Raspberry forum who has just announced a Rust kernel of some sort for the Pi 3: Announce: RusPiRo - a kernel the Rust way ;) - Raspberry Pi Forums

And then there is this GitHub - rust-embedded/rust-raspberrypi-OS-tutorials: Learn to write an embedded OS in Rust about running Rust on a bare metal Pi.

A few days ago I did find all kind of crates for driving GPIO, I2C, PWM on the Pi. Just have to search for the right term.


you can definitely parse it, it's a binary format supposed to be easy to parse by the kernel—for human readability prefer the dts source code—but as you say, it has only the base addresses

due to the popularity of rpi3 i'm on one hand surprised a svd or pac doesn't exist yet, on the other, linux-capable SoC like the bcm2837 and a board like the rpi3 have a huge number of peripherals and registers, and unless the vendor supplies some kind of machine-parsable register description (and they usually don't, definitely not for the larger SoCs), it would be an absurd amount of work to write one based on datasheets and linux source code


Re regiter definitions:

I was using this document as a basis when writing the tutorials:

I floats around the internet in several versions. The one linked works for the RPi3

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.