#4876 closed enhancement (fixed)

RISC-V BSP Variant for the Kendryte K210 SoC

Reported by: Alan Cudmore Owned by: Alan Cudmore <alan.cudmore@…>
Priority: normal Milestone:
Component: bsps Version:
Severity: normal Keywords: risc-v, bsp
Cc: Blocked By:
Blocking:

Description

The Kendryte K210 is low cost 64-bit dual core RISC-V SoC with:

  • Built in 8 MiB SRAM (6 for RISC-V applications, and 2 for the AI NPU)
  • An AI NPU
  • A number of other peripherals including UARTS, SPI, I2C, etc

https://www.canaan.io/product/kendryteai
https://www.seeedstudio.com/blog/2019/09/12/get-started-with-k210-hardware-and-programming-environment/

While it is unclear how long these CPUs will be available, there are still low cost boards available that can run RTEMS including:
https://wiki.sipeed.com/soft/maixpy/en/develop_kit_board/maix_bit.html
https://wiki.sipeed.com/soft/maixpy/en/develop_kit_board/maix_duino.html

In addition there is basic support for the SoC on the renode.io simulator:
https://renode.io/
https://github.com/renode/renode/blob/master/scripts/single-node/kendryte_k210.resc

Caanan provides a standalone SDK with an Apache 2.0 license that has examples for using nearly all of the peripherals including the AI NPU. This could be used as a reference for future BSP support.
https://github.com/kendryte/kendryte-standalone-sdk

Basic RTEMS support for the device is a riscv/riscv BSP variant with only a few code changes, so it should be easy to maintain.

The basic BSP variant is complete and supports a polled console that is shared with the frdme310arty variant, interrupt, and timer support. It uses a built in device tree blob similar to the Microchip polarfire variant.

Change History (6)

comment:1 Changed on 03/16/23 at 01:29:27 by z.ling111

Looking at ticket 4876 wanting to get into bsp development
Do I need hardware to work on this?

comment:2 Changed on 03/28/23 at 18:46:10 by Alan Cudmore <alan.cudmore@…>

In ca1c4e70/rtems:

bsps/riscv: add device tree source and device tree blob header for k210 bsp variant

This patch adds the k210 device tree source and the corresponding
device tree blob encoded in the header which is used for the
embedded device tree blob for the Kendryte K210 BSP variant.

Updates #4876

comment:3 Changed on 03/28/23 at 18:46:12 by Alan Cudmore <alan.cudmore@…>

In 26853a06/rtems:

bsps/riscv: add riscv/kendrytek210 BSP variant source changes

This patch adds support for the Kendryte K210 RISC-V BSP variant.
The SoC uses the existing Interrupt Controller, Timer, and console UART.
It only needs SoC specific initialization and an embedded device tree binary
similar to the polarfire SoC BSP.

Updates #4876

comment:4 Changed on 03/28/23 at 18:46:14 by Alan Cudmore <alan.cudmore@…>

In 4021b87/rtems:

spec: add riscv kendrytek210 variant build options

This patch includes the spec/build options for the riscv kendrytek210
BSP variant. It includes options to allow the frdme310arty console
UART to be used on multiple BSPS, device tree options, memory
options, and other required options for the variant.

Updates #4876

comment:5 Changed on 04/11/23 at 18:09:55 by Alan Cudmore <alan.cudmore@…>

Owner: set to Alan Cudmore <alan.cudmore@…>
Resolution: fixed
Status: newclosed

In e38a900/rtems-docs:

docs/user: add docs for riscv/kendrytek210 BSP variant

This patch adds the documentation for building and running RTEMS on the Kendryte K210
RISC-V SoC. The generic riscv introducion was re-arranged to list the multilib variants
then the specific hardware targets. In addition a couple of errors were fixed for the
generic QEMU commands.

V2 corrected a typo, expanded K210 Console UART parameters, and addded a hyperlink
to renode.io install instructions.

Closes #4876

comment:6 Changed on 04/11/23 at 20:45:15 by Alan Cudmore <alan.cudmore@…>

In cbeaec9/rtems-docs:

docs/user: add docs for riscv/kendrytek210 BSP variant

This patch adds the documentation for building and running RTEMS on the Kendryte K210 RISC-V SoC.
The generic riscv introducion was re-arranged to list the multilib variants then the specific
hardware targets. In addition a couple of errors were fixed for the generic QEMU commands.

V2 corrected a typo, expanded K210 Console UART parameters, and addded a hyperlink to renode.io install
instructions.

V3 clarified the multilib variant description, clarified the multilib variant reference platform, and
corrected capitalization on SiFive?.

V4 improves the instructions for running the K210 BSP on the Renode.io simulator.

V5 cleaned up the text to be no more than 80 characters per line.

V6 applied word wrap to paragraphs and replaced hard coded RTEMS major versions with macros.

Closes #4876

Note: See TracTickets for help on using tickets.