I walk through creating a bare-metal hello world C program for the Risc-V architecture and test it using QEMU.
My prior assembly language video that I referred to in this video is here: • Risc-V Bare Metal Asse...
My github repo with source code: github.com/chu...
Inspiration for this was derived from the excellent blog by Tyler Wilcock at: twilco.github....
If you want to know everything about linker script development, try: mcyoung.xyz/20...
The TI datasheet I referenced is at: www.ti.com/lit...
One note that I did not mention in the video...some might say why I did not use the ENTRY(_start) clause in the linker. Because it would make no difference in this case. ENTRY just writes to the elf header. Because there is not boot loader, the entry point in the header does not matter. The only thing that matters is the order of the code sections. And because I placed the hello.o before start.o in the linker, unless the KEEP directive is used, listing order will govern.
Негізгі бет Risc-V Bare Metal C Hello World!
Пікірлер: 13