• C++ Co-routines

    A key feature of C++20 is co-routines. I’ve spent lots of time using python coroutines, greenlets and SystemC threading. Co-routines should allow a general model of event driven asynchronous programming. However, in C++ they are not easy at all… These references are critical: Lewis Baker’s “C++ Coroutines: Understanding Symmetric-Transfer” -...


  • Things to Think About When Doing Low Level Embedded Systems Development.

    A draft for Medium. What are the foundations of designing and implementing low level software that interacts with real world systems? (By low level I mean baremetal or small footprint RTOS, on a small processor core - Not embedded Linux on a Cortex-A class MCU) An introductory embedded systems book...


  • RISC-V: A Bare-metal Introduction with C++. Part 7, Conclusion.

    This post is a draft for Medium. Is it possible to write pure modern C++ baremetal firmware from ground up for RISC-V? The answer is a qualified yes. The toolchain using Platform IO supported modern C++ with a small configuration change. The startup code required some assembly, but was mostly...


  • RISC-V: A Bare-metal Introduction with C++. Part 6, Interrupt Handling.

    This post is a draft for Medium. The basics of RISC-V interrupt handling, and C++ lambda functions. What are the basics of interrupt handing in RISC-V? Can we utilize modern C++ to simplify the interrupt handling? RISC-V Machine Mode Interrupts The RISC-V ISA is not specialized for embedded applications (compared...


  • RISC-V: A Bare-metal Introduction with C++. Part 5, Machine Mode Timer.

    This post is a draft for Medium. The RISC-V machine mode timer and timing keeping using the C++ std::chrono library. How does RISC-V keep time? How can we perform a periodic task with no operating system? You may take for granted that you can simply ask the operating system to...