Five EmbedDev logo Five EmbedDev

An Embedded RISC-V Blog

Baremetal Programming in C++ for RISC-V

July 18, 2021 (toolchain,baremetal,C++)

I’ve put together a series of posts on Medium covering bare-metal RISC-V development and C++.

Baremetal Startup Code in C++ for RISC-V

April 13, 2021 (toolchain,baremetal,C++)

An example of baremetal bootstrap code for RISC-V in C++.


November 18, 2020 (registers,code,baremetal,quickref)

For baremetal programming I’ll often need to access CSRs, e.g. mstatus.mie for critical sections, mcause in interrupts handlers, etc. Defining function wrappers for accessing these registers creates easier to understand code, however writing these wrappers is pretty tedious.