7.3. Boot using secondary boot loader (SBL) for AM65XX

7.3.1. Building the SBL

  • The secondary boot loader (SBL) prebuilt images are packaged at pdk_<device>_<version>/packages/ti/boot/sbl/binary/am65xx_evm folder. If there is a need to be built from source.

  • Do below to build SBL

    cd pdk_<device>_<version>/packages/ti/build
    make -s sbl_mmcsd_img
    make -s sbl_ospi_img
    make -s sbl_uart_img
    
  • The generated pdk binaries will be present at

    pdk_<device>_<version>/packages/ti/boot/sbl/binary/am65xx_evm
    

7.3.2. SD Boot Mode

7.3.2.1. Prepare a bootable SD card

Important

  • In Linux GUI tool like gparted (sudo apt install gparted) can be used.

  • Below instruction are for windows, in Linux, apply same parameters when formating the SD card

7.3.2.1.1. Option 1: Using windows command prompt

  • Ensure empty SD card (at least 256MB, preferably 8GB SDHC) is available.

  • Ensure SD memory card reader is available.

  • Create a primary FAT partition on MMC/SD card (FAT32 format with sector size 512) and mark it as Active. A partition manager utility has to be used for the same.

  • Format SD card from DOS command line as below.

    format <drive> /A:512 /FS:FAT32
    
  • Make SD card partition as active using tool at this page http://www.pcdisk.com/download.html

7.3.2.1.2. Option 2: Using Diskpart

  • Open windows 7 Command prompt and Run as Administrator mode

  • Enter command “diskpart.exe”

    C:\Windows\system32>diskpart.exe will take you DISKPART prompt
    Warning: Enter below command carefully w.r.t your computer/laptop SD card disk number. Choosing wrong disk number may delete data present in other drive
    To list all disk drive present on computer
    DISKPART> list disk
    Select the SD card disk number, in my case it is disk 1
    DISKPART> select disk 1
    Now all next command applicable only to disk 1(SD card)
    Delete entire partition
    DISKPART> clean
    To create Primary partition
    DISKPART> create partition primary
    To list partition
    DISKPART> list partition
    Select partition
    DISKPART> select partition 1
    To list volume
    DISKPART> list volume
    Select volume associated with SD card, In my case its 3
    DISKPART> select volume 3
    Format SD card, please wait this may take few seconds
    DISKPART>format quick fs=fat32 unit=512 label=SD_BOOT
    Make disk active
    DISKPART> active
    To exit utility
    DISKPART> exit
    

7.3.2.2. Copy files to SD card

When the boot switches are set to the SD boot mode, ROM bootloader will look for the bootable images in the SD card. We need to put the bootloader image, system firmware image and the application images in the SD card.

  1. bootloader Image for SD boot is

    pdk_<device>_<version>/packages/ti/boot/sbl/binary/am65xx_evm/mmcsd/bin/sbl_mmcsd_img_mcu1_0_release.tiimage
    
    • Rename this file to tiboot3.bin

  2. The system firmware image is

    pdk_<device>_<version>/packages/ti/sciclient/soc/V0/sysfw.bin
    
  3. The Application image to boot should be renamed to app

  4. Copy the files ** tiboot3.bin, sysfw.bin and app ** to the SD card root folder to boot from SD card.

7.3.3. OSPI Boot Mode

  • Download and install the latest Uniflash version from https://www.ti.com/tool/UNIFLASH

  • Follow steps at Uniflash User Guide to flash the binaries.

  • After successful flashing, configure boot switches to OSPI boot mode and reset the board

    Image Type

    Offset

    Binary name

    SBL

    0x0

    pdk_<device>_<version>/packages/ti/boot/sbl/binary/am65xx_evm/ospi/bin/sbl_ospi_img_mcu1_0_release.tiimage

    System Firmware

    0x80000

    pdk_<device>_<version>/packages/ti/drv/sciclient/soc/V0/sysfw.bin

    App Image

    0x100000

    Application image, eg: udma_memcpy_testapp_mcu1_0_release.appimage

Note

  1. Use MCU UART port for programming.

  2. When using UART boot mode for programming the flash writer make sure you are using “-i 0” in command e.g. “dslite.bat –mode processors -c <COM_Port> -f <Path_to_the_flash_writer_to_be_transfered> -i 0”