Last month I started the development of firmware for the Kendryte K210 chip. The Kendryte K210 is a microcontroller with hardware acceleration for artificial intelligence (AI) algorithms. It has two RISC-V central processing units and a set of powerful peripherals.
After a successful Indiegogo campaign, the first affordable development boards with this powerful chip became available this year. The MAiX-BiT development board is the first RISC-V 64-bit AI development board with a breadboard friendly form factor.
The chip manufacturer Kendryte has a software development kernel (SDK) available. A Micropython implementation called MaixPy is available for quick results. I like to have full control over the chip and started developing a toolchain with full on-chip debugging support.
Visual Studio Code
I use Visual Studio Code (vscode) as an integrated development environment (IDE). I developed an extension for the GNU RISC-V toolchain for software development and a GNU debugger extension for source-level debugging. These extensions allow professional level firmware development in a free and easy to use development system.
See the Visual Studio Code marketplace for the extensions.
I did some test with Micropython first, and started development in the C++ programming language. The first step was setting up a working compiler toolchain.
The toolchain available from Kendryte, the manufacturer of the chip, didn’t work on my Mac computer. I build a new toolchain from the sources of the Berkely University of California. After some testing and tweaking the settings I have a working toolchain.
Source level debugging
For source-level debugging you need a debug probe and a debugger. The Kendryte implementation of the Open On-Chip Debugger (OpenOCD) only supported the JLink probe. I tested the JLink educational probe with success. The price of this probe is still a bit high for students and makers. I ordered a low cost debug probe from SiPEED and build OpenOCD with support for the Kendryte K210 and the SiPEED USB-JTAG/TTL probe.