Run a C program bare metal on an ARM Cortex M3
In this technical retrospective (2018), @ingve 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 Cloud & Mobile Era (2014–2019)
COMMUNITY SCORE ★ 46 points
TOTAL DISCUSSIONS 9 comments
I'm just getting started with STM32 and this was very informative. I especially liked that you chose a minimal example and walked through the tool chain in detail. It's important to be able to read the compiler output for debugging and optimization and this presented it well. Thanks!
However, why not mention or explain the widely available and extremely affordable ST-link2 or the ST Discovery boards? I suspect that for people just getting started with STM32 these would be more common.
Nice, there aren't really that many guides on bare-metal programming. In general the difficult part is finding the Memory Maps across all the data-sheets and programming manuals. ARMs being SOC's these might change across development boards.
Super appreciate this article, might dust off my of Pandaboard again :)
This is excellent tutorial! I wonder if there is similar tutorials for C++11. It would be great to see more information what to do and don't if you want to run your code on bare metal.
I would like to see version of rust language implementation on ARM CPU like https://os.phil-opp.com/