Ravendyne Inc

Z-Code on

Z-Code is a C++ framework for programming microcontrollers. Think industrial grade Arduino.

It is designed to support any microcontroller you can implement the Hardware Abstraction Layer for.

Z-Code C++ is stripped down to bare essentials and code written for microcontrollers does not support RTTI or exceptions. What is left however, makes for a very powerful tool in its simplicity and flexibility.

Most of the existing Arduino libraries can be ported to Z-Code with little or almost no work at all, except in cases where there’s direct dependency on specific Atmel MCU features.

Z-Code comes with HAL implemented for QEMU ARM emulator and NXP LPC13xx line of microcontrollers.

hello world code that runs on QEMU may look like this:

    #include <zprint>

    #include <cstdint>
    #include <climits>

    // qemu RESET code to stop execution
    extern "C" void CPU_RESET();
    // qemu print helpers
    extern "C" int _write (int fd, char *ptr, int len);
    int iowrite(char c) {return _write(0, &c, 1);}

    class MyPrint : public ZPrint
        size_t write(uint8_t c)
            return 1;

    MyPrint myPrint;

    void setup()
        myPrint.println("Hello there from Z-Code!");


    void loop()
        // empty loop

For more details, checkout the Git repo.