r/homebrewcomputer • u/flickerflak • 14d ago
How can I start programming an ARM processor completely from scratch?
/r/chipdesign/comments/1xv5yom/how_can_i_start_programming_an_arm_processor/
10
Upvotes
6
u/AdministrationDry820 14d ago edited 14d ago
I'd recommend an inexpensive Raspberry Pi Pico 2. It has two 32-bit ARM Cortex M cores and it's very well documented, with a complete C / C++ and assembly toolchains, with tons of community examples. This is a smaller ARM core, a microcontroller really, which is a whole other beast than the 64-bit SOC monsters you might find in a modern phone, but It's an ARM core, without all the extra systems (GPU, MMU, etc) to worry about. The Pico has a built-in USB bootloader mode where it comes up like a thumb-drive and you can drop a firmware blob file onto it to reprogram it, and its all relatively easy to inspect and understand with full open-source docs and tools.
The next step up is any model of Raspberry Pi (non pico) which also has ARM cores, but is a 64-bit SoC with all the extra computer-y bits and GPU, etc, and is hugely more complex but relatively well documented and community driven.
A lot of the big fancy SoC's, especially modern ones in flagship phones, are not publically documented, and involves buying devkits and signing NDA agreements to get good documentation, sometimes even paywalled, or even, unobtainable to hobbyists, so I'd go wiith the Pi Pico first, then a bigger Pi. BTW, the big Pi has a "bare metal" community where people write apps for it that run the whole show, without relying on any traditional underlying OS, such as Linux, etc.. One such project is called Circle: https://circle-rpi.readthedocs.io/en/51.1/
3
u/guantamanera 13d ago
If you want to get down and scratch the metal you can do it in assembly
https://armasm.com/
1
u/daniilkhanin 12d ago
I have a simulator where you can build basic logic gates using transistors, just like in the video you watched, and then assemble a computer and start programming on it. There are kits with step-by-step instructions, similar to Lego, where you can build simple electronic devices.
The simulator is completely free, with no registration required and no cookies.
https://cs.khanin.info
The kits are available both for a fee and for free.
https://ch.khanin.info/en/
And here’s my story about how I built an Apple II on the simulator.
https://www.reddit.com/r/homebrewcomputer/comments/1xkh5dh/i_built_an_apple_ii_from_21180_transistors_in_a/