1.. zephyr:board:: hifive1 2 3Overview 4******** 5 6The HiFive1 is an Arduino-compatible development board with 7an FE310 RISC-V SoC. Two revisions of this board are supported in Zephyr: 8`HiFive1 <https://www.sifive.com/boards/hifive1>`__ (also known as HiFive1 Rev A) 9and `HiFive1 Rev B <https://www.sifive.com/boards/hifive1-rev-b>`__. 10 11.. figure:: img/hifive1.jpg 12 :align: center 13 :alt: SiFive HiFive1 board 14 15 SiFive HiFive1 board (image courtesy of SiFive) 16 17.. figure:: img/hifive1_revb.jpg 18 :align: center 19 :alt: SiFive HiFive1 Rev B board 20 21 SiFive HiFive1 Rev B board (image courtesy of SiFive) 22 23Programming and debugging 24************************* 25 26Building 27======== 28 29Applications for the HiFive1 board configuration can be built as usual (see 30:ref:`build_an_application`) using the corresponding board name: 31 32.. tabs:: 33 34 .. group-tab:: HiFive1 35 36 .. zephyr-app-commands:: 37 :board: hifive1 38 :goals: build 39 40 .. group-tab:: HiFive1 Rev B 41 42 .. zephyr-app-commands:: 43 :board: hifive1@B 44 :goals: build 45 46Flashing 47======== 48 49 50HiFive1 51------- 52 53.. tabs:: 54 55 .. group-tab:: HiFive1 56 57 In order to upload the application to the device, you'll need OpenOCD with 58 RISC-V support. Download the tarball for your OS from the `SiFive website 59 <https://www.sifive.com/boards>`_ and extract it. 60 61 The Zephyr SDK uses a bundled version of OpenOCD by default. You can 62 overwrite that behavior by adding the 63 ``-DOPENOCD=<path/to/riscv-openocd/bin/openocd>`` parameter when building: 64 65 .. zephyr-app-commands:: 66 :board: hifive1 67 :goals: build 68 :gen-args: -DOPENOCD=<path/to/riscv-openocd/bin/openocd> 69 70 When using a custom toolchain it should be enough to have the downloaded 71 version of the binary in your ``PATH``. 72 73 .. group-tab:: HiFive1 Rev B 74 75 The HiFive 1 Rev B uses Segger J-Link OB for flashing and debugging. To flash and 76 debug the board, you'll need to install the 77 `Segger J-Link Software and Documentation Pack 78 <https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack>`_ 79 and choose version V6.46a or later (Downloads for Windows, Linux, and macOS are 80 available). 81 82Now you can flash the application as usual (see :ref:`build_an_application` and 83:ref:`application_run` for more details): 84 85.. code-block:: console 86 87 west flash 88 89Depending on your OS you might have to run the flash command as superuser. 90 91Debugging 92========= 93 94Refer to the detailed overview about :ref:`application_debugging`. 95