AN 1011: TinyML Applications in Altera FPGAs Using LiteRT for Microcontrollers

ID 848984
Date 4/07/2025
Public
Document Table of Contents

5.2. Arm HPS Processor System

You can run the application on HPS either through QSPI flash boot or using the Ashling* RiscFree* IDE for Altera® FPGAs debugger tool. Before starting any process, ensure you have the necessary binary files ready to program the QSPI or run via the debugger. Refer to the following steps:
  1. Create a new directory. Name it tinyml_bins.
    $ cd $TOP_FOLDER
    $ mkdir tinyml_bins
    
  2. Generate the fiptool from ATF repository downloaded in section Arm-Trusted-Firmware. Use this tool to create the binary file that combines the SSBL (bl31.bin) and Zephyr application (zephyr.bin).
    $ cd $TOP_FOLDER/atf_tinyml
    $ ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- make fiptool
    $ cp tools/fiptool/fiptool $TOP_FOLDER/tinyml_bins
    
  3. Copy the bootloader files to the tinyml_bins.
    $ cd $TOP_FOLDER/atf_tinyml/build/agilex5/<release_or_debug>
    $ cp bl2.bin bl31 $TOP_FOLDER/tinyml_bins
    
  4. Copy the generated .sof file from the GHRD according to the steps in the topic GHRD Hardware Design.
    $ cd $TOP_FOLDER/agilex5_soc_devkit/ 
    $ cp ghrd_a5ed065bb32ae6sr0.sof $TOP_FOLDER/tinyml_bins