Risc-V C3 Bare Metal Hello World!

preview_player
Показать описание
I walk through creating a bare metal hello world C3 program for the Risc-V architecture and test it using QEMU.

I forked the C3 repo and added this little test to the maintainer's CI workflow to prove that C3 could actually build a working Risc-V ELF.

Resources
Рекомендации по теме
Комментарии
Автор

in C, volatile and const are called qualifiers.
As for the order during link time, it is important (at least for gcc). I've been bitten by it several times with libraries, if libA uses a symbol defined in libB you need to do -lB -lA.
But I wonder why we don't have that issue with basic C code, since multiple .o files can cross-reference symbols and you never get linker errors. (or is it just main that has the "issue"?)

minirop