[PATCH 1/2] spec: add riscv Kendryte K210 variant options

Alan Cudmore alan.cudmore at gmail.com
Mon Mar 13 15:31:02 UTC 2023


Good idea. With the number of changes, do you think one commit for the
spec/build options and one for the code is sufficient?

On Mon, Mar 13, 2023 at 10:55 AM Gedare Bloom <gedare at rtems.org> wrote:

> I'm not 100% sure it matters, but I think the spec/build commit should
> come after the source is added.  This is a generally good approach
> when integrating code vs build changes, so that you don't try to build
> something that doesn't exist.
>
> On Thu, Mar 9, 2023 at 8:48 PM Alan Cudmore <alan.cudmore at gmail.com>
> wrote:
> >
> > 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.
> > ---
> >  spec/build/bsps/optdtb.yml                    |  4 +++-
> >  spec/build/bsps/optdtbheaderpath.yml          |  2 ++
> >  spec/build/bsps/optfdtuboot.yml               |  3 +++
> >  spec/build/bsps/riscv/optramsize.yml          |  2 ++
> >  spec/build/bsps/riscv/riscv/abi.yml           |  1 +
> >  .../bsps/riscv/riscv/bspkendrtyek210.yml      | 19 ++++++++++++++++++
> >  spec/build/bsps/riscv/riscv/grp.yml           |  4 ++++
> >  spec/build/bsps/riscv/riscv/obj.yml           |  1 +
> >  .../bsps/riscv/riscv/optkendrytek210.yml      | 18 +++++++++++++++++
> >  spec/build/bsps/riscv/riscv/optns16550max.yml |  4 +++-
> >  spec/build/bsps/riscv/riscv/optsifiveuart.yml | 20 +++++++++++++++++++
> >  spec/build/cpukit/optsmp.yml                  |  1 +
> >  12 files changed, 77 insertions(+), 2 deletions(-)
> >  create mode 100644 spec/build/bsps/riscv/riscv/bspkendrtyek210.yml
> >  create mode 100644 spec/build/bsps/riscv/riscv/optkendrytek210.yml
> >  create mode 100644 spec/build/bsps/riscv/riscv/optsifiveuart.yml
> >
> > diff --git a/spec/build/bsps/optdtb.yml b/spec/build/bsps/optdtb.yml
> > index 78fed67866..f775dc7750 100644
> > --- a/spec/build/bsps/optdtb.yml
> > +++ b/spec/build/bsps/optdtb.yml
> > @@ -6,7 +6,9 @@ build-type: option
> >  copyrights:
> >  - Copyright (C) 2020 embedded brains GmbH (
> http://www.embedded-brains.de)
> >  default:
> > -- enabled-by: riscv/mpfs64imafdc
> > +- enabled-by:
> > +  - riscv/mpfs64imafdc
> > +  - riscv/kendrytek210
> >    value: true
> >  - enabled-by: true
> >    value: false
> > diff --git a/spec/build/bsps/optdtbheaderpath.yml
> b/spec/build/bsps/optdtbheaderpath.yml
> > index 65573c4cb8..944c8e830e 100644
> > --- a/spec/build/bsps/optdtbheaderpath.yml
> > +++ b/spec/build/bsps/optdtbheaderpath.yml
> > @@ -8,6 +8,8 @@ copyrights:
> >  default:
> >  - enabled-by: riscv/mpfs64imafdc
> >    value: bsp/mpfs-dtb.h
> > +- enabled-by: riscv/kendrytek210
> > +  value: bsp/kendryte-k210-dtb.h
> >  - enabled-by: true
> >    value: false
> >  description: |
> > diff --git a/spec/build/bsps/optfdtuboot.yml
> b/spec/build/bsps/optfdtuboot.yml
> > index 8c53b8b799..9d91639dc6 100644
> > --- a/spec/build/bsps/optfdtuboot.yml
> > +++ b/spec/build/bsps/optfdtuboot.yml
> > @@ -6,6 +6,9 @@ build-type: option
> >  copyrights:
> >  - Copyright (C) 2020 embedded brains GmbH (
> http://www.embedded-brains.de)
> >  default:
> > +- enabled-by:
> > +  - riscv/kendrytek210
> > +  value: false
> >  - enabled-by: true
> >    value: true
> >  description: |
> > diff --git a/spec/build/bsps/riscv/optramsize.yml
> b/spec/build/bsps/riscv/optramsize.yml
> > index be80c0f462..1fc407d1ea 100644
> > --- a/spec/build/bsps/riscv/optramsize.yml
> > +++ b/spec/build/bsps/riscv/optramsize.yml
> > @@ -15,6 +15,8 @@ default:
> >    value: 0x10000000
> >  - enabled-by: riscv/griscv
> >    value: 0x01000000
> > +- enabled-by: riscv/kendrytek210
> > +  value: 0x00600000
> >  - enabled-by: true
> >    value: 0x04000000
> >  description: ''
> > diff --git a/spec/build/bsps/riscv/riscv/abi.yml
> b/spec/build/bsps/riscv/riscv/abi.yml
> > index ab3046ee24..de23bdd795 100644
> > --- a/spec/build/bsps/riscv/riscv/abi.yml
> > +++ b/spec/build/bsps/riscv/riscv/abi.yml
> > @@ -10,6 +10,7 @@ default:
> >  - enabled-by:
> >    - riscv/mpfs64imafdc
> >    - riscv/rv64imafdc
> > +  - riscv/kendrytek210
> >    value:
> >    - -march=rv64imafdc
> >    - -mabi=lp64d
> > diff --git a/spec/build/bsps/riscv/riscv/bspkendrtyek210.yml
> b/spec/build/bsps/riscv/riscv/bspkendrtyek210.yml
> > new file mode 100644
> > index 0000000000..91c601979e
> > --- /dev/null
> > +++ b/spec/build/bsps/riscv/riscv/bspkendrtyek210.yml
> > @@ -0,0 +1,19 @@
> > +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
> > +arch: riscv
> > +bsp: kendrytek210
> > +build-type: bsp
> > +cflags: []
> > +copyrights:
> > +- Copyright (C) 2022 Alan Cudmore
> > +cppflags: []
> > +enabled-by: true
> > +family: riscv
> > +includes: []
> > +install: []
> > +links:
> > +- role: build-dependency
> > +  uid: ../../opto2
> > +- role: build-dependency
> > +  uid: grp
> > +source: []
> > +type: build
> > diff --git a/spec/build/bsps/riscv/riscv/grp.yml
> b/spec/build/bsps/riscv/riscv/grp.yml
> > index 713c15509a..a2ed4a1052 100644
> > --- a/spec/build/bsps/riscv/riscv/grp.yml
> > +++ b/spec/build/bsps/riscv/riscv/grp.yml
> > @@ -50,10 +50,14 @@ links:
> >    uid: ../../optdtbheaderpath
> >  - role: build-dependency
> >    uid: optfrdme310arty
> > +- role: build-dependency
> > +  uid: optkendrytek210
> >  - role: build-dependency
> >    uid: opthtif
> >  - role: build-dependency
> >    uid: optmpfs
> > +- role: build-dependency
> > +  uid: optsifiveuart
> >  - role: build-dependency
> >    uid: optns16550max
> >  - role: build-dependency
> > diff --git a/spec/build/bsps/riscv/riscv/obj.yml
> b/spec/build/bsps/riscv/riscv/obj.yml
> > index 0ddeef828b..d28945fae4 100644
> > --- a/spec/build/bsps/riscv/riscv/obj.yml
> > +++ b/spec/build/bsps/riscv/riscv/obj.yml
> > @@ -16,6 +16,7 @@ install:
> >    - bsps/riscv/riscv/include/bsp/fe310-uart.h
> >    - bsps/riscv/riscv/include/bsp/irq.h
> >    - bsps/riscv/riscv/include/bsp/riscv.h
> > +  - bsps/riscv/riscv/include/bsp/k210.h
> >  - destination: ${BSP_INCLUDEDIR}/dev/serial
> >    source:
> >    - bsps/riscv/riscv/include/dev/serial/htif.h
> > diff --git a/spec/build/bsps/riscv/riscv/optkendrytek210.yml
> b/spec/build/bsps/riscv/riscv/optkendrytek210.yml
> > new file mode 100644
> > index 0000000000..09848cf6e7
> > --- /dev/null
> > +++ b/spec/build/bsps/riscv/riscv/optkendrytek210.yml
> > @@ -0,0 +1,18 @@
> > +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
> > +actions:
> > +- get-boolean: null
> > +- define-condition: null
> > +build-type: option
> > +copyrights:
> > +- Copyright (C) 2022 Alan Cudmore
> > +default:
> > +- enabled-by: riscv/kendrytek210
> > +  value: true
> > +- enabled-by: true
> > +  value: false
> > +description: |
> > +  enables support for the Kendryte K210 System on Chip if defined to a
> non-zero value, otherwise it is disabled (disabled by default)
> > +enabled-by: true
> > +links: []
> > +name: RISCV_ENABLE_KENDRYTE_K210_SUPPORT
> > +type: build
> > diff --git a/spec/build/bsps/riscv/riscv/optns16550max.yml
> b/spec/build/bsps/riscv/riscv/optns16550max.yml
> > index 423bb5f74f..094a35f81e 100644
> > --- a/spec/build/bsps/riscv/riscv/optns16550max.yml
> > +++ b/spec/build/bsps/riscv/riscv/optns16550max.yml
> > @@ -6,7 +6,9 @@ build-type: option
> >  copyrights:
> >  - Copyright (C) 2020 embedded brains GmbH (
> http://www.embedded-brains.de)
> >  default:
> > -- enabled-by: riscv/frdme310arty
> > +- enabled-by:
> > +  - riscv/frdme310arty
> > +  - riscv/kendrytek210
> >    value: null
> >  - enabled-by: riscv/mpfs64imafdc
> >    value: 1
> > diff --git a/spec/build/bsps/riscv/riscv/optsifiveuart.yml
> b/spec/build/bsps/riscv/riscv/optsifiveuart.yml
> > new file mode 100644
> > index 0000000000..6ad70755d5
> > --- /dev/null
> > +++ b/spec/build/bsps/riscv/riscv/optsifiveuart.yml
> > @@ -0,0 +1,20 @@
> > +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
> > +actions:
> > +- get-boolean: null
> > +- define-condition: null
> > +build-type: option
> > +copyrights:
> > +- Copyright (C) 2020 embedded brains GmbH (
> http://www.embedded-brains.de)
> > +default:
> > +- enabled-by:
> > +  - riscv/kendrytek210
> > +  - riscv/frdme310arty
> > +  value: true
> > +- enabled-by: true
> > +  value: false
> > +description: |
> > +  enables support Sifive UART if defined to a non-zero value, otherwise
> it is disabled (disabled by default)
> > +enabled-by: true
> > +links: []
> > +name: RISCV_ENABLE_SIFIVE_UART_SUPPORT
> > +type: build
> > diff --git a/spec/build/cpukit/optsmp.yml b/spec/build/cpukit/optsmp.yml
> > index bbe93443ad..78f73e8c1b 100644
> > --- a/spec/build/cpukit/optsmp.yml
> > +++ b/spec/build/cpukit/optsmp.yml
> > @@ -49,6 +49,7 @@ enabled-by:
> >  - riscv/rv64imafdc
> >  - riscv/rv64imafdc_medany
> >  - riscv/rv64imafd_medany
> > +- riscv/kendrytek210
> >  - sparc/erc32
> >  - sparc/gr712rc
> >  - sparc/gr740
> > --
> > 2.25.1
> >
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20230313/b70f24fd/attachment.htm>


More information about the devel mailing list