Hacker News new | ask | show | jobs
by AbbeFaria 1878 days ago
I work as a back-end developer so I usually get don't work at the "bare-metal" level. I did get to use a CPU profiler to isolate a lock contention issue with one of our services recently and it was super fun.

But I have realized that I have some gaps in understanding how a processor works (bad idea to not pay attention in your Comp Arch class), I am trying to cover that up by reading up on Comp Arch (Onur Mutlu lectures).

would working on Embedded (in my spare time) help in understanding the processor at a deeper level ? Any pointers on how I can accomplish that ? I am well aware that modern processors are complicated beasts, more complicated than Embedded systems for sure not sure how transferrable those skills are.

1 comments

Are you more interested in understanding the processor itself, or low-level software, eg operating systems concepts and how that interacts with the hardware?

Embedded can certainly help with both, but I would go in the opposite direction from hobbyist-oriented systems like Arduino: learn to set everything up yourself. Bare metal programming, particularly with C and assembly, will require you to understand things like stack pointers, setting up your clocks, initialising hardware.

While 8-bit micros are simpler and you could start with one of those if you wanted (AVR is probably the most accessible), I'd probably go straight to a 32-bit Cortex-M4, get a cheap dev board like [0], and get the sample programs running and try to understand every part of those.

[0] https://www.st.com/en/evaluation-tools/nucleo-f401re.html

I found that AVR devices are more approachable microcontrollers for learning the concepts of setting up and using peripherals at the register level, and studying the part's datasheet. They are so much simpler than ARM chips, with far fewer peripherals and registers.

I think a good approach to this is to take working examples, look up the used registers in the datasheet, understand why setting up the peripherals that particular way accomplishes the goal of the example, and then start experimenting with changes to those registers.

I bought the BBC micro:bit v2. I will experiment with that and see how that goes.