Re: [PATCH v3 2/2] bsp/riscv: Add NOEL-V BSP

2022-07-26 Thread Sebastian Huber

On 15/07/2022 14:54, Sebastian Huber wrote:
diff --git a/spec/build/bsps/riscv/noel/optextirqmax.yml 
b/spec/build/bsps/riscv/noel/optextirqmax.yml

new file mode 100644
index 00..ffa84748b6
--- /dev/null
+++ b/spec/build/bsps/riscv/noel/optextirqmax.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+actions:
+- get-integer: null
+- define: null
+build-type: option
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH 
(http://www.embedded-brains.de)

+default: 64
+default-by-variant: []
+description: |
+  maximum number of external interrupts supported by the BSP (default 
64)

+enabled-by: true
+format: '{}'
+links: []
+name: RISCV_MAXIMUM_EXTERNAL_INTERRUPTS
+type: build


Please move this one level up and reuse it in the other riscv BSPs.


I moved the option to spec/build/bsps/riscv/optextirqmax.yml. Please 
just use it through a link to ../optextirqmax.


--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH v3 2/2] bsp/riscv: Add NOEL-V BSP

2022-07-15 Thread Sebastian Huber



On 14.07.22 16:03, Daniel Cederman wrote:

diff --git a/spec/build/bsps/riscv/noel/optconirq.yml 
b/spec/build/bsps/riscv/noel/optconirq.yml
new file mode 100644
index 00..d836822efb
--- /dev/null
+++ b/spec/build/bsps/riscv/noel/optconirq.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+actions:
+- get-integer: null
+- define: null
+build-type: option
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+default: 0
+default-by-variant: []
+description: |
+  The APBUART console driver can operate in either polled or interrupt mode.
+enabled-by: true
+format: '{}'
+links: []
+name: CONSOLE_USE_INTERRUPTS
+type: build


Please use

spec/build/bsps/optconsoleirq.yml


diff --git a/spec/build/bsps/riscv/noel/optextirqmax.yml 
b/spec/build/bsps/riscv/noel/optextirqmax.yml
new file mode 100644
index 00..ffa84748b6
--- /dev/null
+++ b/spec/build/bsps/riscv/noel/optextirqmax.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+actions:
+- get-integer: null
+- define: null
+build-type: option
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+default: 64
+default-by-variant: []
+description: |
+  maximum number of external interrupts supported by the BSP (default 64)
+enabled-by: true
+format: '{}'
+links: []
+name: RISCV_MAXIMUM_EXTERNAL_INTERRUPTS
+type: build


Please move this one level up and reuse it in the other riscv BSPs.


--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH v3 2/2] bsp/riscv: Add NOEL-V BSP

2022-07-14 Thread Daniel Cederman
From: Martin Aberg 

Added support for Cobham Gaisler NOEL-V systems. The NOEL-V support
is implemented as a riscv BSP. Both 32-bit and 64-bit processor
systems are supported. Cobham Gaisler's NOEL-V RISC-V processor IP
is described here:
  https://www.gaisler.com/NOELV

Compatible with the following NOEL-V FPGA example design ranges
available from Cobham Gaisler. Follow the links for free
bit-streams, DTS/DTB, user's manuals and quick-start guides:
- NOEL-ARTYA7-EX(https://www.gaisler.com/NOEL-ARTYA7)
- NOEL-PF-EX(https://www.gaisler.com/NOEL-PF)
- NOEL-XCKU-EX  (https://www.gaisler.com/NOEL-XCKU)

Uses the shared GRLIB APBUART console driver "apbuart_termios.c".
APBUART devices are probed using device tree.

Update #4225.
---
 bsps/riscv/noel/console/console-config.c  | 209 ++
 bsps/riscv/noel/include/bsp.h |  76 +++
 bsps/riscv/noel/include/bsp/irq.h |  75 +++
 bsps/riscv/noel/include/tm27.h|   1 +
 bsps/riscv/noel/start/bsp_fatal_halt.c|  46 
 bsps/riscv/riscv/include/bsp.h|   2 +
 bsps/riscv/riscv/include/bsp/irq.h|   2 +
 spec/build/bsps/riscv/noel/abi.yml|  48 
 spec/build/bsps/riscv/noel/bspnoel32im.yml|  19 ++
 spec/build/bsps/riscv/noel/bspnoel32imafd.yml |  19 ++
 spec/build/bsps/riscv/noel/bspnoel64imac.yml  |  19 ++
 spec/build/bsps/riscv/noel/bspnoel64imafd.yml |  19 ++
 .../build/bsps/riscv/noel/bspnoel64imafdc.yml |  19 ++
 spec/build/bsps/riscv/noel/grp.yml|  59 +
 spec/build/bsps/riscv/noel/obj.yml|  38 
 spec/build/bsps/riscv/noel/objsmp.yml |  15 ++
 spec/build/bsps/riscv/noel/optconirq.yml  |  16 ++
 spec/build/bsps/riscv/noel/optextirqmax.yml   |  16 ++
 spec/build/bsps/riscv/optrambegin.yml |   3 +
 spec/build/cpukit/optarchbits.yml |   2 +
 spec/build/cpukit/optsmp.yml  |   4 +
 21 files changed, 707 insertions(+)
 create mode 100644 bsps/riscv/noel/console/console-config.c
 create mode 100644 bsps/riscv/noel/include/bsp.h
 create mode 100644 bsps/riscv/noel/include/bsp/irq.h
 create mode 100644 bsps/riscv/noel/include/tm27.h
 create mode 100644 bsps/riscv/noel/start/bsp_fatal_halt.c
 create mode 100644 spec/build/bsps/riscv/noel/abi.yml
 create mode 100644 spec/build/bsps/riscv/noel/bspnoel32im.yml
 create mode 100644 spec/build/bsps/riscv/noel/bspnoel32imafd.yml
 create mode 100644 spec/build/bsps/riscv/noel/bspnoel64imac.yml
 create mode 100644 spec/build/bsps/riscv/noel/bspnoel64imafd.yml
 create mode 100644 spec/build/bsps/riscv/noel/bspnoel64imafdc.yml
 create mode 100644 spec/build/bsps/riscv/noel/grp.yml
 create mode 100644 spec/build/bsps/riscv/noel/obj.yml
 create mode 100644 spec/build/bsps/riscv/noel/objsmp.yml
 create mode 100644 spec/build/bsps/riscv/noel/optconirq.yml
 create mode 100644 spec/build/bsps/riscv/noel/optextirqmax.yml

diff --git a/bsps/riscv/noel/console/console-config.c 
b/bsps/riscv/noel/console/console-config.c
new file mode 100644
index 00..eff3b75250
--- /dev/null
+++ b/bsps/riscv/noel/console/console-config.c
@@ -0,0 +1,209 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSBSPsRISCVNOEL
+ *
+ * @brief This source file contains NOEL-V/APBUART definitions of
+ *   ::BSP_output_char_function_type and :: BSP_output_char and an
+ *   implementation of console_initialize().
+ */
+
+/*
+ * Copyright (c) 2021 Cobham Gaisler AB.
+ *
+ * Copyright (C) 2018 embedded brains GmbH (http://www.embedded-brains.de)
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+#include