Skip to content

Commit 957ecf3

Browse files
henrikbrixandersenkartben
authored andcommitted
boards: others: neorv32: add minimalboot board variant
Add a MinimalBoot board variant for the NEORV32 board. The software configuration of this board matches the NEORV32 "MinimalBoot" processor template. Signed-off-by: Henrik Brix Andersen <[email protected]>
1 parent d866ca9 commit 957ecf3

File tree

8 files changed

+120
-1
lines changed

8 files changed

+120
-1
lines changed

boards/others/neorv32/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Copyright (c) 2021,2025 Henrik Brix Andersen <[email protected]>
22
# SPDX-License-Identifier: Apache-2.0
33

4+
if BOARD_NEORV32_NEORV32_MINIMALBOOT
5+
6+
config BOARD_NEORV32
7+
select RISCV_ISA_RV32I
8+
select ATOMIC_OPERATIONS_C
9+
10+
endif # BOARD_NEORV32_NEORV32_MINIMALBOOT
11+
412
if BOARD_NEORV32_NEORV32_UP5KDEMO
513

614
config BOARD_NEORV32

boards/others/neorv32/board.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
66

77
if("${BOARD_QUALIFIERS}" STREQUAL "/neorv32")
88
message(FATAL_ERROR "Please specify a variant for the neorv32 board "
9-
"(e.g. neorv32/neorv32/up5kdemo)")
9+
"(e.g. neorv32/neorv32/minimalboot or neorv32/neorv32/up5kdemo)")
1010
endif()

boards/others/neorv32/board.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ board:
55
socs:
66
- name: neorv32
77
variants:
8+
- name: "minimalboot"
89
- name: "up5kdemo"
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/*
2+
* Copyright (c) 2025 Henrik Brix Andersen <[email protected]>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <neorv32.dtsi>
10+
#include <mem.h>
11+
12+
/ {
13+
model = "NEORV32 MinimalBoot";
14+
compatible = "neorv32";
15+
16+
aliases {
17+
led0 = &led0;
18+
led1 = &led1;
19+
led2 = &led2;
20+
led3 = &led3;
21+
};
22+
23+
chosen {
24+
zephyr,flash = &imem;
25+
zephyr,sram = &dmem;
26+
zephyr,console = &uart0;
27+
zephyr,shell-uart = &uart0;
28+
zephyr,uart-pipe = &uart0;
29+
};
30+
31+
leds {
32+
compatible = "gpio-leds";
33+
34+
led0: led0 {
35+
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
36+
label = "LED_0";
37+
};
38+
39+
led1: led1 {
40+
gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
41+
label = "LED_1";
42+
};
43+
44+
led2: led2 {
45+
gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
46+
label = "LED_2";
47+
};
48+
49+
led3: led3 {
50+
gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
51+
label = "LED_3";
52+
};
53+
};
54+
};
55+
56+
&cpu0 {
57+
riscv,isa = "rv32i_zicsr_zifencei";
58+
};
59+
60+
&bootrom {
61+
status = "okay";
62+
};
63+
64+
&imem {
65+
status = "okay";
66+
reg = <0x0 DT_SIZE_K(64)>;
67+
};
68+
69+
&dmem {
70+
status = "okay";
71+
reg = <0x80000000 DT_SIZE_K(64)>;
72+
};
73+
74+
&clint {
75+
status = "okay";
76+
};
77+
78+
&mtimer {
79+
status = "okay";
80+
};
81+
82+
&uart0 {
83+
status = "okay";
84+
current-speed = <19200>;
85+
};
86+
87+
&gpio {
88+
status = "okay";
89+
ngpios = <4>;
90+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
identifier: neorv32/neorv32/minimalboot
2+
name: NEORV32 MinimalBoot
3+
type: mcu
4+
arch: riscv
5+
toolchain:
6+
- cross-compile
7+
- zephyr
8+
ram: 64
9+
flash: 64
10+
supported:
11+
- gpio
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2025 Henrik Brix Andersen <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_SERIAL=y
5+
CONFIG_CONSOLE=y
6+
CONFIG_UART_CONSOLE=y
7+
CONFIG_UART_INTERRUPT_DRIVEN=y

tests/drivers/gpio/gpio_api_1pin/testcase.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ tests:
1616
- mps2/an383
1717
- mps2/an386
1818
- mps2/an500
19+
- neorv32/neorv32/minimalboot
1920
- neorv32/neorv32/up5kdemo
2021
drivers.gpio.1pin.aw9523b:
2122
tags:

tests/drivers/gpio/gpio_get_direction/testcase.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ tests:
88
# Fix exclude when we can exclude just sim run
99
platform_exclude:
1010
- mps2/an385
11+
- neorv32/neorv32/minimalboot
1112
- neorv32/neorv32/up5kdemo
1213
filter: dt_enabled_alias_with_parent_compat("led0", "gpio-leds")

0 commit comments

Comments
 (0)