Browse Source
This commit reflects a difference between FE310-G000 and FE310-G002 SoCs, since only the latter supports PMP. The result of that is the split of the HiFive1 board into two separate targets, since the HWMv2 right now assumes that board revisions share the same SoC. Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>pull/89957/merge
31 changed files with 172 additions and 137 deletions
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
# Copyright (c) 2025 Antmicro <www.antmicro.com> |
||||
# SPDX-License-Identifier: Apache-2.0 |
||||
|
||||
config BOARD_HIFIVE1_REVB |
||||
select SOC_SIFIVE_FREEDOM_FE310_G002 |
@ -1,12 +1,11 @@
@@ -1,12 +1,11 @@
|
||||
board: |
||||
name: hifive1 |
||||
full_name: HiFive1 |
||||
vendor: sifive |
||||
socs: |
||||
- name: fe310 |
||||
revision: |
||||
format: letter |
||||
default: "A" |
||||
revisions: |
||||
- name: "A" |
||||
- name: "B" |
||||
boards: |
||||
- name: hifive1 |
||||
full_name: HiFive1 |
||||
vendor: sifive |
||||
socs: |
||||
- name: fe310_g000 |
||||
- name: hifive1_revb |
||||
full_name: HiFive1 Rev B |
||||
vendor: sifive |
||||
socs: |
||||
- name: fe310_g002 |
||||
|
@ -0,0 +1,60 @@
@@ -0,0 +1,60 @@
|
||||
.. zephyr:board:: hifive1 |
||||
|
||||
Overview |
||||
******** |
||||
|
||||
The HiFive1 is an Arduino-compatible development board with an FE310-G000 RISC-V SoC. |
||||
|
||||
.. figure:: img/hifive1.jpg |
||||
:align: center |
||||
:alt: SiFive HiFive1 board |
||||
|
||||
SiFive HiFive1 board (image courtesy of SiFive) |
||||
|
||||
Programming and debugging |
||||
************************* |
||||
|
||||
.. zephyr:board-supported-runners:: |
||||
|
||||
Building |
||||
======== |
||||
|
||||
Applications for the HiFive1 board configuration can be built as usual (see |
||||
:ref:`build_an_application`) using the corresponding board name: |
||||
|
||||
.. zephyr-app-commands:: |
||||
:board: hifive1 |
||||
:goals: build |
||||
|
||||
Flashing |
||||
======== |
||||
|
||||
In order to upload the application to the device, you'll need OpenOCD with |
||||
RISC-V support. Download the tarball for your OS from the `SiFive website |
||||
<https://www.sifive.com/boards>`_ and extract it. |
||||
|
||||
The Zephyr SDK uses a bundled version of OpenOCD by default. You can |
||||
overwrite that behavior by adding the |
||||
``-DOPENOCD=<path/to/riscv-openocd/bin/openocd>`` parameter when building: |
||||
|
||||
.. zephyr-app-commands:: |
||||
:board: hifive1 |
||||
:goals: build |
||||
:gen-args: -DOPENOCD=<path/to/riscv-openocd/bin/openocd> |
||||
|
||||
When using a custom toolchain it should be enough to have the downloaded |
||||
version of the binary in your ``PATH``. |
||||
|
||||
Now you can flash the application as usual (see :ref:`build_an_application` and |
||||
:ref:`application_run` for more details): |
||||
|
||||
.. code-block:: console |
||||
|
||||
west flash |
||||
|
||||
Depending on your OS you might have to run the flash command as superuser. |
||||
|
||||
Debugging |
||||
========= |
||||
|
||||
Refer to the detailed overview about :ref:`application_debugging`. |
@ -0,0 +1,51 @@
@@ -0,0 +1,51 @@
|
||||
.. zephyr:board:: hifive1_revb |
||||
|
||||
Overview |
||||
******** |
||||
|
||||
The HiFive1 Rev B is an Arduino-compatible development board with an FE310-G002 RISC-V SoC. |
||||
|
||||
.. figure:: img/hifive1_revb.jpg |
||||
:align: center |
||||
:alt: SiFive HiFive1 Rev B board |
||||
|
||||
SiFive HiFive1 Rev B board (image courtesy of SiFive) |
||||
|
||||
Programming and debugging |
||||
************************* |
||||
|
||||
.. zephyr:board-supported-runners:: |
||||
|
||||
Building |
||||
======== |
||||
|
||||
Applications for the HiFive1 Rev B board configuration can be built as usual (see |
||||
:ref:`build_an_application`) using the corresponding board name: |
||||
|
||||
.. zephyr-app-commands:: |
||||
:board: hifive1_revb |
||||
:goals: build |
||||
|
||||
Flashing |
||||
======== |
||||
|
||||
The HiFive 1 Rev B uses Segger J-Link OB for flashing and debugging. To flash and |
||||
debug the board, you'll need to install the |
||||
`Segger J-Link Software and Documentation Pack |
||||
<https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack>`_ |
||||
and choose version V6.46a or later (Downloads for Windows, Linux, and macOS are |
||||
available). |
||||
|
||||
Now you can flash the application as usual (see :ref:`build_an_application` and |
||||
:ref:`application_run` for more details): |
||||
|
||||
.. code-block:: console |
||||
|
||||
west flash |
||||
|
||||
Depending on your OS you might have to run the flash command as superuser. |
||||
|
||||
Debugging |
||||
========= |
||||
|
||||
Refer to the detailed overview about :ref:`application_debugging`. |
@ -1,96 +0,0 @@
@@ -1,96 +0,0 @@
|
||||
.. zephyr:board:: hifive1 |
||||
|
||||
Overview |
||||
******** |
||||
|
||||
The HiFive1 is an Arduino-compatible development board with |
||||
an FE310 RISC-V SoC. Two revisions of this board are supported in Zephyr: |
||||
`HiFive1 <https://www.sifive.com/boards/hifive1>`__ (also known as HiFive1 Rev A) |
||||
and `HiFive1 Rev B <https://www.sifive.com/boards/hifive1-rev-b>`__. |
||||
|
||||
.. figure:: img/hifive1.jpg |
||||
:align: center |
||||
:alt: SiFive HiFive1 board |
||||
|
||||
SiFive HiFive1 board (image courtesy of SiFive) |
||||
|
||||
.. figure:: img/hifive1_revb.jpg |
||||
:align: center |
||||
:alt: SiFive HiFive1 Rev B board |
||||
|
||||
SiFive HiFive1 Rev B board (image courtesy of SiFive) |
||||
|
||||
Programming and debugging |
||||
************************* |
||||
|
||||
.. zephyr:board-supported-runners:: |
||||
|
||||
Building |
||||
======== |
||||
|
||||
Applications for the HiFive1 board configuration can be built as usual (see |
||||
:ref:`build_an_application`) using the corresponding board name: |
||||
|
||||
.. tabs:: |
||||
|
||||
.. group-tab:: HiFive1 |
||||
|
||||
.. zephyr-app-commands:: |
||||
:board: hifive1 |
||||
:goals: build |
||||
|
||||
.. group-tab:: HiFive1 Rev B |
||||
|
||||
.. zephyr-app-commands:: |
||||
:board: hifive1@B |
||||
:goals: build |
||||
|
||||
Flashing |
||||
======== |
||||
|
||||
|
||||
HiFive1 |
||||
------- |
||||
|
||||
.. tabs:: |
||||
|
||||
.. group-tab:: HiFive1 |
||||
|
||||
In order to upload the application to the device, you'll need OpenOCD with |
||||
RISC-V support. Download the tarball for your OS from the `SiFive website |
||||
<https://www.sifive.com/boards>`_ and extract it. |
||||
|
||||
The Zephyr SDK uses a bundled version of OpenOCD by default. You can |
||||
overwrite that behavior by adding the |
||||
``-DOPENOCD=<path/to/riscv-openocd/bin/openocd>`` parameter when building: |
||||
|
||||
.. zephyr-app-commands:: |
||||
:board: hifive1 |
||||
:goals: build |
||||
:gen-args: -DOPENOCD=<path/to/riscv-openocd/bin/openocd> |
||||
|
||||
When using a custom toolchain it should be enough to have the downloaded |
||||
version of the binary in your ``PATH``. |
||||
|
||||
.. group-tab:: HiFive1 Rev B |
||||
|
||||
The HiFive 1 Rev B uses Segger J-Link OB for flashing and debugging. To flash and |
||||
debug the board, you'll need to install the |
||||
`Segger J-Link Software and Documentation Pack |
||||
<https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack>`_ |
||||
and choose version V6.46a or later (Downloads for Windows, Linux, and macOS are |
||||
available). |
||||
|
||||
Now you can flash the application as usual (see :ref:`build_an_application` and |
||||
:ref:`application_run` for more details): |
||||
|
||||
.. code-block:: console |
||||
|
||||
west flash |
||||
|
||||
Depending on your OS you might have to run the flash command as superuser. |
||||
|
||||
Debugging |
||||
========= |
||||
|
||||
Refer to the detailed overview about :ref:`application_debugging`. |
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
||||
identifier: hifive1@B |
||||
identifier: hifive1_revb |
||||
name: SiFive HiFive1 Rev B |
||||
type: mcu |
||||
arch: riscv |
@ -1,4 +1,9 @@
@@ -1,4 +1,9 @@
|
||||
# SPDX-License-Identifier: Apache-2.0 |
||||
# Copyright (c) 2018 SiFive, Inc. |
||||
|
||||
CONFIG_CONSOLE=y |
||||
CONFIG_SERIAL=y |
||||
CONFIG_UART_SIFIVE_PORT_0=y |
||||
CONFIG_UART_CONSOLE=y |
||||
CONFIG_GPIO=y |
||||
CONFIG_BUILD_OUTPUT_HEX=y |
Loading…
Reference in new issue