source: rtems-docs/user/bsps/bsps-riscv.rst @ 3859073

Last change on this file since 3859073 was 3859073, checked in by Chris Johns <chrisj@…>, on 08/03/22 at 04:22:20

versions: Update microblaze, powerpc, riscv and x86_64

Updates #4695

  • Property mode set to 100644
File size: 3.4 KB
Line 
1.. SPDX-License-Identifier: CC-BY-SA-4.0
2
3.. Copyright (C) 2018 embedded brains GmbH
4
5riscv (RISC-V)
6**************
7
8riscv
9=====
10
11This BSP offers 13 variants:
12
13* rv32i
14
15* rv32iac
16
17* rv32im
18
19* rv32imac
20
21* rv32imafc
22
23* rv32imafd
24
25* rv32imafdc
26
27* rv64imac
28
29* rv64imac_medany
30
31* rv64imafd
32
33* rv64imafd_medany
34
35* rv64imafdc
36
37* rv64imafdc_medany
38
39* frdme310arty
40
41Each variant corresponds to a GCC multilib.  A particular variant reflects an
42ISA with ABI and code model choice.
43
44The basic hardware initialization is not performed by the BSP.  A boot loader
45with device tree support must be used to start the BSP, e.g. BBL.  The BSP must
46be started im machine mode.
47
48The reference platform for this BSP is the Qemu `virt` machine.
49
50Build Configuration Options
51---------------------------
52
53The following options can be used in the BSP section of the ``waf``
54configuration INI file. The ``waf`` defaults can be used to inspect the values.
55
56``BSP_PRESS_KEY_FOR_RESET``
57    If defined to a non-zero value, then print a message and wait until pressed
58    before resetting board when application terminates.
59
60``BSP_RESET_BOARD_AT_EXIT``
61    If defined to a non-zero value, then reset the board when the application
62    terminates.
63
64``BSP_PRINT_EXCEPTION_CONTEXT``
65    If defined to a non-zero value, then print the exception context when an
66    unexpected exception occurs.
67
68``BSP_FDT_BLOB_SIZE_MAX``
69    The maximum size of the device tree blob in bytes (default is 65536).
70
71``BSP_CONSOLE_BAUD``
72    The default baud for console driver devices (default 115200).
73
74``RISCV_MAXIMUM_EXTERNAL_INTERRUPTS``
75     The maximum number of external interrupts supported by the BSP (default
76     64).
77
78``RISCV_ENABLE_HTIF_SUPPORT``
79     Enables the HTIF support if defined to a non-zero value, otherwise it is
80     disabled (disabled by default).
81
82``RISCV_CONSOLE_MAX_NS16550_DEVICES``
83     The maximum number of NS16550 devices supported by the console driver (2
84     by default).
85
86``RISCV_RAM_REGION_BEGIN``
87     The begin of the RAM region for linker command file (default is 0x70000000
88     for 64-bit with -mcmodel=medlow and 0x80000000 for all other).
89
90``RISCV_RAM_REGION_SIZE``
91     The size of the RAM region for linker command file (default 64MiB).
92
93``RISCV_ENABLE_FRDME310ARTY_SUPPORT``
94     Enables support sifive Freedom E310 Arty board if defined to a non-zero
95     value,otherwise it is disabled (disabled by default)
96
97Interrupt Controller
98--------------------
99
100Exactly one Core Local Interruptor (CLINT) and exactly one Platform-Level
101Interrupt Controller (PLIC) are supported.  The maximum number of external
102interrupts supported by the BSP is defined by the
103``RISCV_MAXIMUM_EXTERNAL_INTERRUPTS`` BSP option.
104
105Clock Driver
106------------
107
108The clock driver uses the CLINT timer.
109
110Console Driver
111--------------
112
113The console driver supports devices compatible to
114
115* "ucb,htif0" (depending on the ``RISCV_ENABLE_HTIF_SUPPORT`` BSP option),
116
117* "ns16550a" (see ``RISCV_CONSOLE_MAX_NS16550_DEVICES`` BSP option), and
118
119* "ns16750" (see ``RISCV_CONSOLE_MAX_NS16550_DEVICES`` BSP option).
120
121* "sifive,uart0" (see ``RISCV_ENABLE_FRDME310ARTY_SUPPORT`` BSP option).
122
123They are initialized according to the device tree.  The console driver does not
124configure the pins or peripheral clocks.  The console device is selected
125according to the device tree "/chosen/stdout-path" property value.
126
127griscv
128======
129
130This RISC-V BSP supports chips using the
131`GRLIB <https://www.gaisler.com/products/grlib/grlib.pdf>`_.
Note: See TracBrowser for help on using the repository browser.