SiFive HiFive Premier P550 Software Reference Manual

Hide thumbs Also See for HiFive Premier P550:

Advertisement

Quick Links

HiFive Premier P550 Software Reference Manual
Version 1.0
Copyright © by SiFive, Inc. All rights reserved.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the HiFive Premier P550 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for SiFive HiFive Premier P550

  • Page 1 HiFive Premier P550 Software Reference Manual Version 1.0 Copyright © by SiFive, Inc. All rights reserved.
  • Page 2 SiFive does not assume any liability arising out of the application or use of any product or cir- cuit, and specifically disclaims any and all liability, including without limitation indirect, incidental, special, exemplary, or consequential damages.
  • Page 3: Table Of Contents

    Contents List of Tables ........................3 List of Figures ........................ 4 Introduction ......................5 HiFive Premier P550 Software Images and Partitions .......6 ....................... 6 Software Images ......................6 Partition Table ......................... 8 Boot Flow .................... 8 Shutdown of the System Freedom U SDK Overview ................
  • Page 4 ................23 Serial Console and Debugger Pod ................24 FTDI Linux plugdev Configuration ................24 FTDI Device Driver Management ..............27 Determining the Network Configuration ................28 Secure Shell (SSH) Connection RISC-V Linux Software Structure ...............29 Copyright © by SiFive, Inc. All rights reserved.
  • Page 5: List Of Tables

    List of Tables ..................7 Table 1 SPI Flash Layout (16MB) ..................8 Table 2 EMMC Flash Layout (128GB) ......................23 Table 4 Serial Port Copyright © by SiFive, Inc. All rights reserved.
  • Page 6: List Of Figures

    Boot DIP Switch Settings for Boot ................23 Figure 2 HiFive Premier P550 Connectivity ........25 Figure 3 Example of Incorrect Windows 11 FTDI Serial Configuration ........26 Figure 4 Example of Correct Windows 11 FTDI Serial Configuration Copyright © by SiFive, Inc. All rights reserved.
  • Page 7: Introduction

    • RISC-V specification. This document also is not intended to provide a Linux tutorial. HiFive Premier P550 Software Reference Manual targets users who are familiar with working in a Linux environment. Copyright © by SiFive, Inc. All rights reserved.
  • Page 8: Hifive Premier P550 Software Images And Partitions

    HiFive Premier P550 Software Images and Partitions This chapter describes the required HiFive Premier P550 software images, the partition table, and the boot flow. 2.1 Software Images The HiFive Premier P550 images comprise the following: • Bootchain image: bootloader_ddr5_secboot.bin. ◦ This image comprises the DDR firmware, the second stage loader, OpenSBI, and U- Boot proper.
  • Page 9 HiFive Premier P550 Software Reference Manual HiFive Premier P550 Software Images and Partitions Table 1: SPI Flash Layout (16MB) Partition Name Size/Type Description bootchain 13.5 MiB/ (start The image file written into the bootchain is named bootloader_ddr5_secboot.bin from 0) nsign...
  • Page 10: Boot Flow

    2.3 Boot Flow HiFive Premier P550 supports booting from SPI flash. For this mode, the Boot Select DIP switch has to be set to "0010" as shown in the figure below. Figure 1: Boot DIP Switch Settings for Boot...
  • Page 11 HiFive Premier P550 Software Reference Manual HiFive Premier P550 Software Images and Partitions The commands below should be used to start the Linux shutdown process. After the user has been notified that this process has finished, the board main power will be turned off.
  • Page 12: Freedom U Sdk Overview

    OpenEmbedded and BitBake is beyond the scope of this document; many resources are available on the Internet. It is important to note that building Freedom U SDK for the HiFive Premier P550 is resource intensive. Consider the following requirements to build Freedom U SDK:...
  • Page 13 This build target will construct images suitable for writing to eMMC, which can be used to boot the HiFive Premier P550 board. A utility called esburntool can be used to write the images to eMMC. The graphical build image (also known as the xfce4 image) is about 8.1GBytes uncom- pressed.
  • Page 14: Toolchains Included With Fusdk

    The Freedom-U-SDK build includes both GCC and Clang (LLVM) toolchains. 3.2 Identification of FUSDK version From the prompt of a HiFive Premier P550 system, you can determine which build you have by executing the following command to view the release info for that build:...
  • Page 15 The below command can be used to show the layers, paths, and priorities of all the OpenEmbedded layers: $ kas shell freedom-u-sdk/scripts/kas/hifive-premier-p550.yml -c 'bitbake-layers show-layers'` Copyright © by SiFive, Inc. All rights reserved.
  • Page 16 The meta-sifive layer contains recipes for bootloaders, patch files, unique configurations for the HiFive Premier P550 board, kernel, and setup script for the build environment. The meta-open- embedded contains many extra components for GUI, networking, file system, and additional meta layers.
  • Page 17: Bitbake Recipe Flow

    There are greater than 10,000 tasks that are run for a FUSDK build. 1. Fetch 2. Unpack 3. Patch 4. Configure 5. Compile 6. Install 7. Package Copyright © by SiFive, Inc. All rights reserved.
  • Page 18: Build History And Logs

    When making changes or debugging build issues, it can be helpful to reproduce the BitBake environment. You can do this with the devshell command for example to setup the Linux kernel build environment: $ kas shell freedom-u-sdk-hf-prem/scripts/kas/hifive-premier-p550.yml -c 'bitbake -c devshell linux-sifive-hf-premier-p550' Copyright © by SiFive, Inc. All rights reserved.
  • Page 19: Release, Source, And Build Details

    For example, if the OpenSBI SHA used in the compilation is not compatible with the out-of-tree patches being maintained for OpenSBI in meta-sifive, the user will face compile-time or runtime problems. The compatibility is defined in the periodic Yocto releases on https://github.com/sifive/ freedom-u-sdk/tree/rel/fusdk/hifive-premier-p550 that will bring together validated and compatible versions of the software components.
  • Page 20: Linux Kernel Source And The Kernel Boot Image

    Release, Source, and Build Details 4.3 Linux Kernel Source and the Kernel Boot Image The Linux Kernel source is available at: https://github.com/sifive/riscv-linux The HiFive Premier P550 board is supported on the branch: rel/kernel/hifive-premier-p550 4.3.1 Building the Linux Kernel and boot.vfat with Yocto Users using the Yocto build system can use the following steps to compile the kernel and create the boot.vfat image after cloning FUSDK.
  • Page 21: Building The Bootchain Image

    • Get the nsign source and compile nsign. • Execute nsign to generate the bootchain. DDR Firmware DDR firmware is released as a binary image ddr_fw.bin on https://github.com/sifive/hifive- premier-p550-tools/ Second Boot Loader The second boot loader is released as a binary image second_boot_fw.bin on https://github.com/sifive/hifive-premier-p550-tools/...
  • Page 22 The HiFive Premier P550 board is supported on the branch: rel/meta-sifive/hifive-premier- p550 Within the meta-sifive, the out-of-tree patches for U-Boot and OpenSBI are available at: • U-Boot: recipes-bsp/u-boot/files • OpenSBI: opensbi/opensbi-sifive-hf-prem These patches will be needed in the next steps.
  • Page 23 • Second Boot Firmware: second_boot_fw.bin • DDR Firmware: ddr_fw.bin • OpenSBI, U-Boot: fw_payload.bin The following command with the nsign config file meta-sifive (recipes-bsp/bootchain/files/ nsign.cfg) will generate the bootchain image. ./nsign path to nsign.cfg Copyright © by SiFive, Inc. All rights reserved.
  • Page 24: Hifive Premier P550 Connectivity

    HiFive Premier P550 Connectivity Figure 2 below shows typical and optional connectivity of a HiFive Premier P550 system. The supported connectivity options allow the user to monitor and control the system. Often, there are multiple connectivity options used simultaneously with the HiFive Premier P550, with each option having advantages and disadvantages.
  • Page 25: Serial Console And Debugger Pod

    HiFive Premier P550 Software Reference Manual HiFive Premier P550 Connectivity Figure 2: HiFive Premier P550 Connectivity 5.1 Serial Console and Debugger Pod The HiFive Premier P550 Type-C USB connector exposes four serial ports. Table 4: Serial Port Port Description ttyUSB0...
  • Page 26: Ftdi Linux Plugdev Configuration

    A Linux host machine is convenient because it can be used to build the FUSDK, use OpenOCD with the EIC7700, function as a serial console for the HiFive Premier P550, transfer files to/from the HiFive Premier P550, and also develop applications for the HiFive Premier P550 platform.
  • Page 27: Figure 3 Example Of Incorrect Windows 11 Ftdi Serial Configuration

    HiFive Premier P550 Software Reference Manual HiFive Premier P550 Connectivity Figure 3: Example of Incorrect Windows 11 FTDI Serial Configuration Figure 4 shows an example of correct Windows 11 Device Manager FTDI serial configuration: Copyright © by SiFive, Inc. All rights reserved.
  • Page 28: Figure 4 Example Of Correct Windows 11 Ftdi Serial Configuration

    For manual installation, please consult the FTDI Support Website for the Device Drivers and Instructions for OS-specific installations. Copyright © by SiFive, Inc. All rights reserved.
  • Page 29: Determining The Network Configuration

    This networking device may have provided the HiFive Premier P550 with an IP address. The IP address can be determined from the board using a query of the Linux running on the HiFive Premier P550 using the ip addr command.
  • Page 30: Secure Shell (Ssh) Connection

    This is especially critical if you enable network access to the board. The ssh daemon is enabled by default. SSH can be enabled through the serial console or the GUI interface. Enabling or disabling SSH connections to the HiFive Premier P550 board is controlled by line 34 /etc/ssh/sshd_config PermitRootLogin .
  • Page 31: Risc-V Linux Software Structure

    Machine mode privilege. OpenSBI is a runtime service provider and not a bootloader. OpenSBI runs in Machine mode and has the highest privilege of all software in this software stack. Figure 5: Privileged Software Stack Copyright © by SiFive, Inc. All rights reserved.

Table of Contents