Getting started with RISC-V

Posted on September 24, 2019
Tags: arduino, electronics, making

Maix Bit box

I’ve been intrigued by the idea of RISC-V, an open ISA that can be implemented by anyone. So when I saw that Seeed Studio had the Maix Bit, a board based on the Kendryte K210, for just $12.90, I decided to get one and try it out.

It appears that Sipeed (maker of the Maix Bit board) intends for it to primarily be programmed in MicroPython. And judging from comments on the Seeed Studio product page, it appears that MicroPython on the Maix Bit might not be ready for prime time yet.

I was more interested in programming the Maix Bit in C/C++, and there are three ways of doing this:

The Maix Bit can be added to the Arduino IDE using the Boards Manager. And the two other SDKs can be downloaded from Kendryte.

However, all three of these options are also available via PlatformIO. Since I’ve been messing around with PlatformIO recently, I decided to go that route.

I downloaded the examples via git:

ppelleti@patrick64:~/src$ git clone
Cloning into 'platform-kendryte210'...
remote: Enumerating objects: 343, done.
remote: Counting objects: 100% (343/343), done.
remote: Compressing objects: 100% (210/210), done.
remote: Total 343 (delta 178), reused 265 (delta 114), pack-reused 0
Receiving objects: 100% (343/343), 47.66 KiB | 0 bytes/s, done.
Resolving deltas: 100% (178/178), done.
Checking connectivity... done.
ppelleti@patrick64:~/src$ cd platform-kendryte210/examples
ppelleti@patrick64:~/src/platform-kendryte210/examples$ ls
arduino-blink  kendryte-freertos-sdk_hello  kendryte-standalone-sdk_hello
ppelleti@patrick64:~/src/platform-kendryte210/examples$ cd arduino-blink/

The only tricky thing that stymied me for a while was that there are four boards listed in the platformio.ini file. Since I have a Maix Bit, I assumed that the one to choose was sipeed-maix-bit. However, running pio run -t upload -e sipeed-maix-bit failed to find the board. I couldn’t figure out why.

Finally, with some help from the PlatformIO forum, I found out that what I actually had was a Maix Bit with microphone, which is considered a different board than the Maix Bit. I had to add the following lines to the platformio.ini file in the arduino-blink directory:

platform = kendryte210
framework = arduino
board = sipeed-maix-bit-mic
monitor_speed = 115200

With these lines added, I was then able to do pio run -t upload -e sipeed-maix-bit-mic, which then succeeded, and the LED on my Maix Bit started blinking!

The documentation on the Maix Bit and the K210 is not particularly great (at least not in English; I don’t know if the Chinese documentation is any better or not) and it also isn’t particularly well organized. To help with the latter, here are some links to the documentation:

Also, the source to the Arduino core is here as well as on GitHub.

Maix Bit front

Maix Bit back