Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tutorial explains procedure to measure transition times and respected power values when either PS or PL suspends or wake up. By following below procedure, user can see/measure the suspend/wake-up time and power. These procedures are for 2021.1 and later releases.

...

  • Use below command to create and enable custom petalinux application

    Code Block
    petalinux-config --silentconfig
    petalinux-create -t apps --template install --name myapp --enable
  • Copy apu_script.sh (provided in prebuilt section) to myapp folder

    Code Block
    cp <dow_dir>/apu_script.sh <petalinux_proj_dir>/project-spec/meta-user/recipes-apps/myapp/files/
  • Update myapp.bb (located at project-spec/meta-user/recipes-apps/myapp/) as shown below

    Code Block
    #
    # This file is the myapp recipe.
    #
     
    SUMMARY = "Simple myapp application"
    SECTION = "PETALINUX/apps"
    LICENSE = "MIT"
    LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
    FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
     
    SRC_URI = "file://myapp \
            file://apu_script.sh \
            "
     
    S = "${WORKDIR}"
    CFLAGS_prepend = "-I ${S}/include"
     
    do_install() {
            echo "D: ${D}"
            echo "S: ${S}"
            install -d ${D}${bindir}
            install -m 0755 ${S}/myapp ${D}${bindir}
            install -m 0755 ${S}/apu_script.sh ${D}${bindir}
    }
  • Enable ECC  in FSBL code:

    • Create directory <plnx-proj-root>/project-spec/meta-user/recipes-bsp/fsbl/files/ (if not present)

    • Copy patch file to <plnx-proj-root>/project-spec/meta-user/recipes-bsp/fsbl/files/ (Patch attached in prebuilt section)

    • Open file <plnx-proj-root>/project-spec/meta-user/recipes-bsp/fsbl/fsbl-firmware_%.bbappend (create if not present)

    • Add below lines in file:

      Code Block
      FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
      SRC_URI += " file://ecc_fsbl.patch"
  • Now build petalinux using below command

    Code Block
    petalinux-build

...

  • Open Vitis and start with empty application as shown below

  • Select “create a new hardware platform“ and select petalinux prebuilt XSA file as shown below (uncheck generate boot components option in case of ZynqMP)

  • Select target processor as "psu_cortexr5_0" and give the application name (ex. rpu_app)

  • Click next and leave all options unchanged

  • Click next and select "Empty Application" from the template list

  • Click finish which will show the project window as shown below

  • Now click on "Navigate to BSP" settings and click "Modify BSP settings"

  • Now select the "xilpm" library option as shown below.

  • Select psu_cortexr5_0 and add “-DDEBUG_MODE“ in extra_compiler_flags as shown below and click ok.

  • Right click on "rpu_app" from explorer and select "import sources" option

  • Download rpu_src.tar and extract it to local folder

  • Select the source and target path as shown below and click ok

  • Right click on "rpu_app" from explorer and select "build project"

...