Risc-V Bare Metal C Hello World!

Chuck's Tech Talk
Chuck's Tech Talk
4.6 هزار بار بازدید - 2 ماه پیش - I walk through creating a
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 Assembler Hello World!   My github repo with source code: github.com/chuckb/riscv-helloworld-c/tree/HC7b1SVX… Inspiration for this was derived from the excellent blog by Tyler Wilcock at: twilco.github.io/riscv-from-scratch/2019/04/27/ris… If you want to know everything about linker script development, try: mcyoung.xyz/2021/06/01/linker-script/#fn:not-main The TI datasheet I referenced is at: www.ti.com/lit/ds/symlink/tl16c550d.pdf 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.
2 ماه پیش در تاریخ 1403/04/25 منتشر شده است.
4,611 بـار بازدید شده
... بیشتر