• RISC-V: A Baremetal Introduction using C++. System Registers.

    This post is a draft for Medium. This is the fifth post in a series. What are system registers in RISC-V? How can we access them with modern C++? System registers require special instructions to access, so unlike memory mapped registers (MMIO) we can’t just cast a pointer to memory...


  • RISC-V: A Baremetal Introduction using C++. Startup.

    This post is a draft for Medium. In the last post, we set up the development environment. This post is about how the RISC-V core executes our program. How do we go from reset to entering the main() function in C++ in RISC-V? Startup code is generally not something you...


  • RISC-V: A Baremetal Introduction using C++. Development Environment

    This post is a draft for Medium. Following on from Part 2, how do we compile this project and run it? For this series of posts, my platform is a SiFive HiFive1 Rev B development board. It’s equipped with a 320MHz RV32IMAC (FE310 core). For software build and debug the...


  • RISC-V: A Baremetal Introduction using C++. Overview.

    This post is a draft. Final version on Medium. As described in Part 1, a simple C++ application to blink an LED, what does this look like with no operating system? Blinky in C++ Here we have blinky on SiFive HiFive1 Rev B development board, built and loaded via Platform...


  • RISC-V: A Baremetal Introduction using C++. Introduction.

    This post is a draft. Final version on Medium. What does it look like to program with no operating system? Can we have direct access to hardware using a high-level language like C++? How does RISC-V work at the most stripped-back bare metal level? This is a series of posts...