Devlog: UART_print(“Hello, World!”);

Hello, i was a bit longer gone, i made a little break, however, now i will tell you what i made. (Info: For all who don’t know what UART is, its part of the RISC-V Architecture.)

(Short Note, i’m not an expert in anything, i’m learning, i only write about the things i learned and how i interpred / use them in the current Moment. Things also can be simplified for better understanding!)

What I made.

I made a print function in C that allowed me to display strings(Text) on the Screen (currently Linux Terminal, see screenshot below:)

For this i made a print function i can call with a string as Parameter, it goes then to a function that puts the Characters one at the time into a Special Register (MMIO) called UART. I have to check if the UART is ready for my Character with a flag that is positioned in a 5 Bytes offset, there i have to check the 5 Bit if i can send my Character or if i have to wait.

Why is it that important?

I need a way to let the kernel show me what it’s doing — without going through every line in a debugger. So one of the very first things in a kernel is a communication method. The kernel needs a way to talk back to you, and UART is the earliest and simplest way to do that.

Wait, thats it?

Yes, there is not a lot more without going into technical details, setting this up would take me now if i had to re-write it about 5 minutes Max. But a print function alone can’t help that much in some scenarios, i am currently working on a simple printf, but this is for another time.

Thank you for Reading :D

Littleclone.