Bare Metal Programming on Raspberry Pi 3
In this technical retrospective (2020), @oumua_don17 shares practical architectural lessons learned from running, scaling, or migrating production software under lean constraints.
Core Principles for Independent Builders:
Defaulting to simpler architectures (such as monolithic frameworks, SQLite, or managed VPS) prevents early engineering bankruptcy.
Evaluating true compute and egress costs reveals that high cloud bills can often be slashed by 80%+ through judicious re-platforming.
Code you write at 2 AM as a solo engineer must be easy to debug six months later without complex microservice dependencies.
Community Debate Themes:
HN engineers debated the tradeoffs between cloud convenience and raw server economics, database indexing strategies, and resisting premature architectural complexity.
CATEGORY Frugal Engineering →
HISTORICAL ERA Pandemic Bubble (2020–2022)
COMMUNITY SCORE 142 points
TOTAL DISCUSSIONS 29 comments
The project creator makes the following statements regarding 64-bit capabilities:
"Second, it's a 64 bit machine. I gave up programming for 32 bit long long time ago. The 64 bit is so much more interesting, as it's address space is increadibly huge, bigger than the storage capacity which allows us to use some interesting new solutions."
I find it odd to make this argument in the context of Raspberry Pi 3 since it only has 1GB RAM onboard. This is only 1/4 of the total space that can addressed by 32-bit addresses.
Thank you.
UART using polling[0] instead of interrupts, i.e. sending a character and waiting in a busy loop until it gets sent, isn't it quite wasteful?
[0] https://github.com/bztsrc/raspi3-tutorial/blob/master/03_uart1/uart.c ↗
It's not really bare-metal, given that a ThreadX OS controls booting of the raspberry pi and continues to run afterwards
https://ownyourbits.com/2019/02/02/whats-wrong-with-the-raspberry-pi/ ↗
Side note: Microsoft bought ThreadX in 2019.
What does he mean by this? Rust has no-std mode, you can run it on an ARM M0 if you so desire.
Oh, turns out I can't write bare metal software in C++, I should stop doing this probably.