Skip to content

Commit 1caf683

Browse files
AlexCharltonkartben
authored andcommitted
boards: beaglev_fire: document flashing board
In addition to some minor corrections, document the process of flashing the board. Signed-off-by: Alex Charlton <[email protected]>
1 parent f415724 commit 1caf683

File tree

1 file changed

+53
-1
lines changed

1 file changed

+53
-1
lines changed

boards/beagle/beaglev_fire/doc/index.rst

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@ hobbyists, and researchers to explore and experiment with RISC-V technology.
1515
Building
1616
========
1717

18+
There are three board configurations provided for the BeagleV-Fire:
19+
20+
* ``beaglev_fire_polarfire_e51``: Uses only the E51 core
21+
* ``beaglev_fire_polarfire_u54``: Uses the U54 cores
22+
* ``beaglev_fire_polarfire_u54_smp``: Uses the U54 cores with CONFIG_SMP=y
23+
1824
Applications for the ``beaglev_fire`` board configuration can be built as usual:
1925

2026
.. zephyr-app-commands::
2127
:zephyr-app: samples/hello_world
22-
:board: beaglev_fire
28+
:board: beaglev_fire_polarfire_u54
2329
:goals: build
2430

2531
Debugging
@@ -76,3 +82,49 @@ and load the binary:
7682
load
7783
break main
7884
continue
85+
86+
Flashing
87+
========
88+
When using the PolarFire `Hart Software Services <https://github.com/polarfire-soc/hart-software-services>`_ along with Zephyr, you need to use the `hss-payload-generator <https://github.com/polarfire-soc/hart-software-services/tree/master/tools/hss-payload-generator>`_ tool to generate an image that HSS can boot.
89+
90+
.. code-block:: yaml
91+
92+
set-name: 'ZephyrImage'
93+
94+
# Define the entry point address for each hart (U54 cores)
95+
hart-entry-points:
96+
u54_1: '0x80000000'
97+
98+
# Define the payloads (ELF binaries or raw blobs)
99+
payloads:
100+
<path_to_zephyr.elf>:
101+
exec-addr: '0x80000000' # Where Zephyr should be loaded
102+
owner-hart: u54_1 # Primary hart that runs Zephyr
103+
priv-mode: prv_m # Start in Machine mode
104+
skip-opensbi: true # Boot directly without OpenSBI
105+
106+
After generating the image, you can flash it to the board by restarting a board that's connected over USB and UART, interrupting the HSS boot process with a key press, and then running the ``mmc`` and ``usbdmsc`` commands:
107+
108+
.. code-block:: bash
109+
110+
Press a key to enter CLI, ESC to skip
111+
Timeout in 1 second
112+
.[6.304162] Character 100 pressed
113+
[6.308415] Type HELP for list of commands
114+
[6.313276] >> mmc
115+
[10.450867] Selecting SDCARD/MMC (fallback) as boot source ...
116+
[10.457550] Attempting to select eMMC ... Passed
117+
[10.712708] >> usbdmsc
118+
[14.732841] initialize MMC
119+
[14.736400] Attempting to select eMMC ... Passed
120+
[15.168707] MMC - 512 byte pages, 512 byte blocks, 30621696 pages
121+
Waiting for USB Host to connect... (CTRL-C to quit)
122+
. 0 bytes written, 0 bytes read
123+
USB Host connected. Waiting for disconnect... (CTRL-C to quit)
124+
/ 0 bytes written, 219136 bytes read
125+
126+
This will cause the board to appear as a USB mass storage device. You can then then flash the image with ``dd`` or other tools like `BalenaEtcher <https://www.balena.io/etcher/>`_:
127+
128+
.. code-block:: bash
129+
130+
dd if=<path_to_zephyr.elf> of=/dev/sdXD bs=4M status=progress oflag=sync

0 commit comments

Comments
 (0)