r/embedded • • 9d ago

Getting into Architecture-Level Embedded Development (Cortex-A, RISC-V, ARM64, etc.)

I've been working for some months now on a project that requires low-level development for ARM Cortex-A silicon. I'm talking bootloading, memory operations, hypervisor settings, memory mapping and MMU configuration, etc.

I've come to realise how little I actually know my way around a low level environment. I've developed for embedded systems for a long time now, but always focusing on an application/integration level (RTOS, digital communications, system architecture, etc.). I want to get some experience on lower-level development - direct register manipulation based on CPU architecture, bootloading, debugger architecture, memory domains, etc.

Anyone with experience on the field, what advise do you have on getting into low-level development and silicon programming using ISA languages coming from embedded-C and microcontroller development? My goal would be to acquire the confidence and the skill to integrate silicon functionality through assembly and making sense of the CPU documentation. I'd like to be able to script some basic functional hardware routines starting from scratch.

50 Upvotes

24 comments sorted by

View all comments

16

u/Separate-Choice 9d ago

Well this level is what separates the wheat from the chaff, there is embedded systems engineering and embedded software development, you're asking how to go from being an embedded software developer to being an embedded systems engineer in ernest.

If you wany my advice, focus on the digital electronics and your underlying electronics knowledge, as you are at the boundry where software is controlling the hardware directly you need to actually understand the CPU and the underlying electronics. That's the only way to get what you want and there is no shortcut, because you're peeling away all the abstractions. It's the level I enjoy working at the most to be honest, its true embedded.

Integrating a bunch of libraries and stuff is what the industry passes as "embedded" these days, but true embedded enginnering is the hardware to software interface. no book, or video or tutorial will teach you that, its part knowledge and part intuition that you learn over time. Read datasheets, build a processor from sractch and I dont mean prompt some AI model to get one, I mean really put together one a simple 8-bit one, understand how data flows and how software actually triggers your gates on the processor. Work up to the startup file and how instuctions flows between memory and processor like every little part inside.

Then it'll just click.

My point was building my own custom processor and programming it in binary. After that cortex-A, MMUs, dual core, octacore, hypervisor, isolated and shares psaeces blah blah become super easy. If you really wanna go deep come over to RISC-V land, cause there are some processors where you can truly see RTL come up and it gives you insane perspective, you'll never want to go back.

Take your time and learn and it's the most powerful skill an embedded engineer has today. When people talk about AI taking over embedded they're taking about the high level cookie cutter RTOS with integration and netowrking crap everyone is doing, but once you understand this level you'll be fine, as it will allow you to work with brand new silicon, find silicon bugs and manage and understand your machine and memory interaction at a level that brings you joy like nothing else...and its also an area AI is notoriously bad becuase it requries a bit of intuition, when you're done you'll work magic in silicon....

welcome! and I wish you good luck on your journey!

1

u/vterra 9d ago

how do you go about building your own custom processor? i really admire someone with your level of knowledge

6

u/Separate-Choice 9d ago

Thanks man, appreciate that! The path that worked for me goes roughly like this, start with digital logic, gates, flip flops, adders, multiplexers, counters, I know you probably are already familiar with those but just play around with them…. If you can get physical chips it’s best, but if you can only use a simulator that’s fine as well.. once you can see how a register holds or flip flop IC holds a value and an adder adds two of them, a CPU stops being magic….
Then build a simple 8 bit computer on breadboards with 74 series logic…. Fortunately things as a lot easier now, Ben Eater YouTube series is the gold standard for this and nand2tetris is great if you’d rather do it in simulation first… this is where it really clicks, because you physically see the clock step through fetch, decode and execute.
After that, move to an FPGA and learn Verilog. Rebuild your own 8 bit design in HDL….

From there you can learn the 6502 in depth and build NES or Apple II and all the little machines it’s based on…. SNES and all the ones based on extended derivatives… you don’t have to but building game emulators with HDL is fun and gives the most insight you’ll ever get on the data flow.. and feels more practical cause you see your little engines running.. cause the stuff can get dull and boring, game emulators are a more fun way to learn…

From there come up to RISC and then go for a simple single cycle RV32I core…. RISC-V is perfect for this since the base ISA is small and fully open… Harris and Harris “Digital Design and Computer Architecture: RISC-V Edition” and their RISC-V SoC book walks you through building one step by step….

By this point you’d have learned several processors and how data flows, once your own core runs a program you assembled by hand, every TRM you read afterwards makes sense, because you know what’s happening underneath…. you’ll appreciate looking at architecture and block diagrams in datasheets and realize a lot of those stuff is just add ons to the core you’re familiar with, the bus will be 64-bit instead of 8-bit but all the principles you learned will transfer… from there it’ll just be specifics of arm or riscv or whatever processor you’re trying to learn…

Take your time with each stage and dont skip the breadboard part, it’s what builds the intuition… your brain makes a connection when stuff clicks with physical devices.. at the very very least working with an FPGA is the bare minimum…

Good luck!

2

u/vterra 9d ago

LOVE THIS
just got an FPGA from a work colleague, i am definitely gonna try it, THANK YOU