1.. _mpfs_icicle:
2
3Microchip mpfs_icicle
4#####################
5
6Overview
7********
8
9The Microchip mpfs_icicle board is a PolarFire SoC FPGA based development board with a Microchip MPFS250T fpga device.
10The E51 RISC-V CPU can be deployed on the mpfs_icicle board.
11More information can be found on the `Microchip website <https://www.microchip.com/en-us/product/MPFS250T>`_.
12
13Programming and debugging
14*************************
15
16Building
17========
18
19Applications for the ``mpfs_icicle`` board configuration can be built as usual
20(see :ref:`build_an_application`):
21
22.. zephyr-app-commands::
23   :board: mpfs_icicle
24   :goals: build
25
26
27Flashing
28========
29
30In order to upload the application to the device, you'll need OpenOCD and GDB
31with RISC-V support.
32You can get them as a part of SoftConsole SDK.
33Download and installation instructions can be found on
34`Microchip's SoftConsole website
35<https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/programming-and-debug/softconsole>`_.
36
37With the necessary tools installed, you can connect to the board using OpenOCD.
38To establish an OpenOCD connection run:
39
40.. code-block:: bash
41
42   sudo LD_LIBRARY_PATH=<softconsole_path>/openocd/bin \
43   <softconsole_path>/openocd/bin/openocd  --file \
44   <softconsole_path>/openocd/share/openocd/scripts/board/microsemi-riscv.cfg
45
46
47Leave it running, and in a different terminal, use GDB to upload the binary to
48the board. You can use the RISC-V GDB from a toolchain delivered with
49SoftConsole SDK.
50
51Here is the GDB terminal command to connect to the device
52and load the binary:
53
54.. code-block:: console
55
56   <softconsole_path>/riscv-unknown-elf-gcc/bin/riscv64-unknown-elf-gdb \
57   -ex "target extended-remote localhost:3333" \
58   -ex "set mem inaccessible-by-default off" \
59   -ex "set arch riscv:rv64" \
60   -ex "set riscv use_compressed_breakpoints no" \
61   -ex "load" <path_to_executable>
62
63Debugging
64=========
65
66Refer to the detailed overview of :ref:`application_debugging`.
67