Skip to content

kalebpace/rtthread-nix-zig-ch32v208wbu6-r0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RT-Thread with Nix and Zig on CH32V208WBU6

Getting Started

Setup Nix on macOS: https://zero-to-nix.com/start/install

Command Description
nix build .#rtthread.bsp.wch.risc-v.ch32v208w-r0 Builds the ch32v208w-r0 example project using the MRS Toolchain for macOS
nix run .#wchisp.flash Flash a board connected via USB-C and in download mode
nix run .#wch-link.flash Flash a board connected via WCH Link and in download mode

Project Features & Goals

  • Build, flash, and blink onboard LED with example application using the Nix interface
  • Configure RT-Thread with menuconfig using the Nix interface
    • Enable ESP module for wifi connectivity
    • Enable Arduino compatability mode
  • Build blink project using zig cc
  • Port blink to main.zig and build with build.zig
  • Implement I2C OLED binary clock

Introduction

This project started with the intention to build a simple binary clock using RT-Thread and Zig. Due in part to its first-class C interop, Zig was chosen to evaluate its tooling, build system, and its ease of use as a drop-in gcc replacement. Though, after spending significant time setting up tooling, piecing together documentation, and verifying board health/features, focus shifted more to developer experience than on project implementation.

Once receiving a CH32V208WBU6 development board from WCH as part of the RT-Thread hackathon/competition, my first todo was to verify the board was healthy. This was met with difficulty in building provided example applications, configuring multiple IDEs: RT-Thread Studio and MounRiver Studio, and finding the necessary tools to flash/debug the dev board.

There was also a separate interest in developing on a Macbook Pro M1 with VSCode instead of Windows 10 with Eclipse-based IDEs. This lead to the setup of a Nix project to aid in managing tools, environments, and any cross-building needs that may surface.

Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published