Skip to content

Commit 8e88195

Browse files
wasilewskiJfabiobaltieri
authored andcommitted
boards: hifive_unmatched: add support for S7 and U74 targets
Add `hifive_unmatched//s7` (earlier selected by default, using `hifive_unmatched`) and `hifive_unmatched//u74` targets. Define work-area for other 4 cores in openocd.cfg Update twister platform white/black lists, to support new targets Signed-off-by: Jakub Wasilewski <[email protected]> Signed-off-by: Filip Kokosinski <[email protected]>
1 parent 2423c87 commit 8e88195

29 files changed

+270
-30
lines changed

boards/sifive/hifive_unmatched/Kconfig.hifive_unmatched

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
config BOARD_HIFIVE_UNMATCHED
5-
select SOC_SIFIVE_FREEDOM_FU740
5+
select SOC_SIFIVE_FREEDOM_FU740_S7 if BOARD_HIFIVE_UNMATCHED_FU740_S7
6+
select SOC_SIFIVE_FREEDOM_FU740_U74 if BOARD_HIFIVE_UNMATCHED_FU740_U74

boards/sifive/hifive_unmatched/doc/index.rst

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,21 @@ Building
1515
Applications for the ``hifive_unmatched`` board configuration can be built as
1616
usual (see :ref:`build_an_application`) using the corresponding board name:
1717

18-
.. zephyr-app-commands::
19-
:board: hifive_unmatched
20-
:goals: build
18+
.. tabs::
19+
20+
.. group-tab:: S7
21+
22+
.. zephyr-app-commands::
23+
:zephyr-app: samples/hello_world
24+
:board: hifive_unmatched/fu740/s7
25+
:goals: build
26+
27+
.. group-tab:: U74
28+
29+
.. zephyr-app-commands::
30+
:zephyr-app: samples/hello_world
31+
:board: hifive_unmatched/fu740/u74
32+
:goals: build
2133

2234
Flashing
2335
========
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2024 Antmicro <www.antmicro.com>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "hifive_unmatched.dtsi"
10+
11+
/ {
12+
cpus {
13+
cpu@1 {
14+
status = "disabled";
15+
};
16+
17+
cpu@2 {
18+
status = "disabled";
19+
};
20+
21+
cpu@3 {
22+
status = "disabled";
23+
};
24+
25+
cpu@4 {
26+
status = "disabled";
27+
};
28+
};
29+
};

boards/sifive/hifive_unmatched/hifive_unmatched.yaml renamed to boards/sifive/hifive_unmatched/hifive_unmatched_s7.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
identifier: hifive_unmatched
2-
name: SiFive HiFive Unmatched
1+
identifier: hifive_unmatched/fu740/s7
2+
name: SiFive HiFive Unmatched (S7)
33
type: mcu
44
arch: riscv
55
toolchain:
@@ -8,6 +8,7 @@ ram: 3840
88
simulation: renode
99
simulation_exec: renode
1010
testing:
11+
timeout_multiplier: 6
1112
ignore_tags:
1213
- net
1314
- bluetooth
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright (c) 2024 Antmicro <www.antmicro.com>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "hifive_unmatched.dtsi"
10+
11+
/ {
12+
cpus {
13+
cpu@0 {
14+
status = "disabled";
15+
};
16+
};
17+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
identifier: hifive_unmatched/fu740/u74
2+
name: SiFive HiFive Unmatched (U74)
3+
type: mcu
4+
arch: riscv
5+
toolchain:
6+
- zephyr
7+
ram: 3840
8+
simulation: renode
9+
simulation_exec: renode
10+
testing:
11+
timeout_multiplier: 6
12+
ignore_tags:
13+
- net
14+
- bluetooth
15+
renode:
16+
uart: sysbus.uart0
17+
resc: boards/sifive/hifive_unmatched/support/hifive_unmatched.resc
18+
supported:
19+
- spi
20+
- memc
21+
vendor: sifive
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
CONFIG_CONSOLE=y
4+
CONFIG_SERIAL=y
5+
CONFIG_UART_SIFIVE_PORT_0=y
6+
CONFIG_UART_CONSOLE=y
7+
CONFIG_XIP=n
8+
CONFIG_RV_BOOT_HART=1
9+
CONFIG_FLOAT_HARD=y

boards/sifive/hifive_unmatched/support/openocd_hifive_unmatched.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@ target create $_TARGETNAME.3 riscv -chain-position $_TARGETNAME -coreid 3
1818
target create $_TARGETNAME.4 riscv -chain-position $_TARGETNAME -coreid 4
1919
target smp $_TARGETNAME.0 $_TARGETNAME.1 $_TARGETNAME.2 $_TARGETNAME.3 $_TARGETNAME.4
2020
$_TARGETNAME.0 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
21+
$_TARGETNAME.1 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
22+
$_TARGETNAME.2 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
23+
$_TARGETNAME.3 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
24+
$_TARGETNAME.4 configure -work-area-phys 0x80000000 -work-area-size 0x4000 -work-area-backup 1
2125

2226
flash bank onboard_spi_flash0 fespi 0x20000000 0 0 0 $_TARGETNAME.0 0x10040000

0 commit comments

Comments
 (0)