I have an hifive1 board and I recently had an idea to program myself a tiny minimal OS that runs on the microcontroller. (and can communicate via serial or something similar)
I tried to google for some resources on the topic, but found very few results which were really confusing.
I don’t really understand how the boot and memory really work - What exactly is the flash memory and how it should be used? Where do the instructions get fetched from? What other memory do I have? What exactly does the toolchain do?
And apart from that, I struggle with understanding the details of how to compile/assemble my code, how to define certain regions of memory (for example the stack), and generally how do I approach this?
I know that probably most of these questions are beginner questions and might be annoying, but I would really appreciate it if someone could help me understand what’s going on and point me to good resources.