AM64x MCU+ SDK  10.00.00
SBL DFU

Introduction

SBL_DFU is a bootloader which boots the multicore application received via USB DFU. It is analogous to SBL UART

  • DFU which stands for (Device Firmware Upgrade) is a standard device class of USB. This application uses DFU to transfer appimages from host pc to RAM.
    • It uses DFU class from TinyUSB stack please refer to USB for more information.
  • SBL DFU implements the dfu task which receives the appimage and put it into a dedicated buffer in RAM memory. Once the manifestation stage of DFU state machine is completed and DFU state machine goes to IDLE state, then the dfu task will be exited and booting process of the received image will be initiated.
  • It uses bootloader APIs to do the SOC initializations. Once the appimage is received, the SBL parses it and splits the appimage into RPRCs where each RPRC image corresponds to a distinct core. After that it initializes each core and load the corresponding RPRC image. This step sets the entry points and the core is then released from reset.
  • Refer to DFU_1.1.pdf to know more about USB DFU class.
Note
This bootloader performs memory boot i.e it directly boots from the appimage received in RAM buffer. Due to this as of now the maximum boot image size supported with SBL DFU is 384KB

Supported Combinations

Parameter Value
CPU + OS r5fss0-0 nortos
Toolchain ti-arm-clang
Board am64x-evm, am64x-sk
Example folder examples/drivers/boot/sbl_dfu

Steps to Run the Example

Since this is a bootloader and is used as a SOC initialization binary, the example will be run every time you boot an application using this example. It is generally run from a boot media (OSPI Flash, SD Card or over UART) unlike other examples which are usually loaded with CCS. Nevertheless, you can build this example like you do for the others using makefile or build it via CCS by importing as a project.

  • When using CCS projects to build, import the CCS project for the required combination and build it using the CCS project menu (see Using SDK with CCS Projects).
  • When using makefiles to build, note the required combination and build using make command (see Using SDK with Makefiles )

Example Usage

  • Make sure that dfu-util tool is installed on your host pc. In case of windows make sure that appropriate windows USB generic drivers are installed.
  • The application boot is a 4 step process.
  1. Put the device into DFU boot mode EVM Setup
  2. Connect the USB cable to the HOST PC and observer that correct DFU device is detected.
  3. Run the following command which uses dfu-util to send the SBL DFU bootloader tiimage.
    sudo dfu-util -i 0 -a 0 <path to mcu_plus_sdk>/tools/boot/sbl_prebuilt/am64x-evm/sbl_dfu.release.hs_fs.tiimage 

DFU ROM boot log

4 Run the following command which uses dfu-util tool to send the appimages. SBl DFU receives that and boots the application.

sudo dfu-util -i 0 -a 0 -D <path to appimage>

See Also

BOOTLOADER

USB DFU Uniflash.

Flashing Tools

Flash a Hello World example using DFU

USB Bootloader Python Script