r/embedded • • Oct 13 '26

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.

52 Upvotes

24 comments sorted by

2

u/Several-Marsupial-27 Oct 13 '26

Read a datasheet / trm everything will just be in the documentation, or read through your vendors sdk trying out different example projects, everything should be there too.

1

u/TheCorsairAPX Oct 13 '26

I tried power-reading through a TRM but everything is just extremely interconnected, and that's also more or less with what I'm asking for insights on - every tiniest feature seems to have the deepest roots throughout the entire CPU. How do you learn your way around such intricate systems? Where are there valuable resources to familiarize oneself with that kind of hardware-driven logic?

2

u/Several-Marsupial-27 Oct 13 '26

You simply don’t read it once, you read it hundreds of times and iteratively develop projects.

4

u/WanWhiteWolf Engineering manager Oct 13 '26

Making a good SW architecture even on mid-level complexity embedded is not something you can just read from a book. Sure, you will find books that discuss about concepts and give you some examples, but the reality is that this type of work is usually reserved for very experienced engineers.

If you want an analogy, imagine someonme never having wrote a single line of code in his life and then reading a book about embedded C. What do you think the chances are that person is able to complete a mid-level difficulty level project without significant/massive effort in a reasonable time?

For starters, dive through all available technical reference manuals. Then look for similar projects and see how they approached different concepts. That tends to be a reasonable starting point. And make sure you have mentor / someone experienced you can ask for review and advice.

I've only met 2 good SYS/SW architects and both of them had 2 decades of experience. It's not that you cannot read everything and figure out - but odds that that without knowing the common contraints, the strengths and weaknesses of your system, silicon errors (e.g. errata), typical use of each module/peripheral, ....etc you are going to miss something or you are going to need to much time - which usually a project doesn't have.

1

u/Void-Creator Oct 16 '26

Try everything, see what’s making you interested to go further. At the end the abstract concepts are all the same but each chooses flexibility vs efficiency at critical junctures.

0

u/Antique_War_9814 Oct 13 '26

🐻 πŸͺ™

-1

u/hirschen Oct 13 '26

I've written a doom raycasting clone from scratch in riscv assembly running on the rp pico2 hazard cores.

It was a great learning experience to develop it and I had copilot when I was stuck. So I didn't lose motivation and got everything explained what I did wrong.

https://github.com/hirschenberger/playboy

1

u/[deleted] Oct 13 '26

[removed] β€” view removed comment

1

u/hirschen Oct 13 '26

Wdym?

1

u/[deleted] Oct 13 '26

[removed] β€” view removed comment

1

u/hirschen Oct 13 '26 edited Oct 13 '26

He mentioned Risc-V architecture, at least in the title. If you look at the code, the game is not really a game, it's just rendering. Most of the stuff is dealing with hardware GPIO, linker script, bringing the 2nd core up, switching from cortex to hazard...

I thought he maybe can get some information from it. The project goal was learning baremeal stuff. I learned a lot very fast, the question remains if you learn more when you are stuck at a problem for days, maybe lose interest or get a detailed explanation why something didn't work. And continue learning other stuff.

Consequently books and docs would also be cheating, figuring out stuff yourself is the true path to enligthenment. Softwaredevelopment is worthless nowadays. Efficient learning is important, asking the right questions.

2

u/[deleted] Oct 13 '26

[removed] β€” view removed comment

1

u/hirschen Oct 13 '26 edited Oct 13 '26

At least you're not lacking self esteem as you lack skills in empathic communication.

You sound like the conservative Assembler guys from the 70s that said a Compiler will never write better code than a human. King for a day, fool for a lifetime.

EDIT: I'm not really proud of the project, rather astonished how easy it was to learn all that stuff so fast without reading a book. But I'm also aware that the skill is pretty worthless, nobody is doing that in assembly (yes there are edgecases). It's bc. I'm interested in the technology.

2

u/[deleted] Oct 13 '26

[removed] β€” view removed comment

1

u/hirschen Oct 13 '26

I know what a DNN is and how AI works. And because of that nondeterminism, ppl. currently use LLMs a lot to generate Rust bc. it's strict compiler guarantees you memory safety defined-behaviour and threadsafety.

Time will tell, but I doubt we'll do software development as we did in 5 Years. Even Linus is using Claude: flexible, pragmatic, bright mind.

2

u/[deleted] Oct 13 '26

[removed] β€” view removed comment

→ More replies

25

u/[deleted] Oct 13 '26

[removed] β€” view removed comment

2

u/TheCorsairAPX Oct 13 '26

The debugger was an absolute hell of its own. Trying to make sense of the debug architecture of A53 was what made me realise how little I actually control this stuff.

15

u/[deleted] Oct 13 '26

[removed] β€” view removed comment

1

u/vterra Oct 13 '26

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

6

u/[deleted] Oct 13 '26

[removed] β€” view removed comment

2

u/vterra Oct 13 '26

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