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