AM275 FreeRTOS SDK  11.00.00
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
SBL EMMC

Introduction

This is a bootloader example, which shows an example of booting RTOS/NORTOS applications on R5 and C7x cores.

The booting is done in single stage

  • The stage is multithreaded with one thread runs the sciServer and the other thread runs the SBL which boots the RTOS/NORTOS applications to R5/C7x cores

The SBL uses 4 appimages

  • tiboot3.bin with SBL, TIFS, BoardConfig
  • mcelf for R5
  • mcelf for C7x

Supported Combinations

Parameter Value
CPU + OS wkup_r5fss0-0 freertos
Toolchain ti-arm-clang
Board am275x-evm
Example folder examples/drivers/boot/sbl_emmc

Steps to Run the Example

Build the example

Since this is a bootloader, the example will be run every time you boot an application using this example. It is run from a eMMC boot media 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)
  • Refer to the page Basic steps to flash files to flash this bootloader along with the application to boot.

Create HSM Appimage

Note
Change DEVICE_TYPE to HS in ${SDK_INSTALL_PATH}/devconfig/devconfig.mak and then generate HSM Appimage for HS-SE device.
  • Create a HSM Appimage
  • This can be done by running the makefile at {SDK_INSTALL_PATH}/tools/boot/HSMAppimageGen
  • Refer HSM Appimage Generator Tool for more details

Run the example

  • This example is the SBL which needs to be flashed on the EVM flash, along with sample application images for R5 and C7x.
Note
For HS-SE device, use sbl_emmc_hs.cfg as the cfg file.
For HS-FS device, use sbl_emmc_hs_fs.cfg as the cfg file.
  • There is a default flash config file as shown below which flashes this SBL and the IPC RPMsg echo applications
      ${SDK_INSTALL_PATH}/tools/boot/sbl_prebuilt/am275x-evm/sbl_emmc_hs_fs.cfg
    
  • Make sure IPC rpms echo application is built before running the flash script. (see IPC RP Message Echo)
  • To flash to the EVM, refer to Flash an example application . Only when giving the flash config file, point to the sbl_emmc_hs_fs.cfg shown above.
  • Example, assuming SDK is installed at C:/ti/mcu_plus_sdk and this example and IPC application is built using makefiles, and RTOS Appimage is already created, in Windows,
      cd C:/ti/mcu_plus_sdk/tools/boot
      python uart_uniflash.py -p COM13 --cfg=C:/ti/mcu_plus_sdk/tools/boot/sbl_prebuilt/am275x-evm/sbl_emmc_hs_fs.cfg
    
  • If Linux PC is used, assuming SDK is installed at ~/ti/mcu_plus_sdk
      cd ~/ti/mcu_plus_sdk/tools/boot
      python uart_uniflash.py -p /dev/ttyUSB0 --cfg=sbl_prebuilt/am275x-evm/sbl_emmc_hs_fs.cfg
    
  • Boot the EVM in eMMC boot mode.

See Also

Sample Output

After flashing and booting the EVM, you will see below output on the UART console (Complete log is not shown)

Sciserver Testapp Built On: Nov 29 2024 18:43:49
Sciserver Version: v2023.11.0.0REL.MCUSDK.MM.NN.PP.bb
RM_PM_HAL Version: vMM.NN.PP
Starting Sciserver..... PASSED
Starting EMMC Bootloader ...
SYSFW Firmware Version 10.0.8--w2024.02-am275x (Fiery
SYSFW Firmware revision 0xa
SYSFW ABI revision 4.0
[BOOTLOADER_PROFILE] Boot Media : EMMC
[BOOTLOADER_PROFILE] Boot Media Clock : 166.667 MHz
[BOOTLOADER_PROFILE] Boot Image Size : 457 KB
[BOOTLOADER_PROFILE] Cores present :
[BOOTLOADER PROFILE] TIFS init : 722us
[BOOTLOADER PROFILE] System_init : 1801us
[BOOTLOADER PROFILE] Board_init : 2us
[BOOTLOADER PROFILE] FreeRtosTask Create : 255us
[BOOTLOADER PROFILE] Drivers_open : 97us
[BOOTLOADER PROFILE] Board_driversOpen : 0us
[BOOTLOADER PROFILE] sciServer_init : 15043us
[BOOTLOADER PROFILE] SBL Drivers_open : 3052us
[BOOTLOADER PROFILE] SBL Board_driversOpen : 94us
[BOOTLOADER PROFILE] Sciclient Get Version : 10187us
[BOOTLOADER PROFILE] DSP 0 Image Load : 11551us
[BOOTLOADER PROFILE] DSP 1 Image Load : 11521us
[BOOTLOADER PROFILE] R5FSS0_0 Image Load : 5941us
[BOOTLOADER PROFILE] R5FSS0_1 Image Load : 5807us
[BOOTLOADER PROFILE] R5FSS1_0 Image Load : 5819us
[BOOTLOADER PROFILE] R5FSS1_1 Image Load : 5805us
[BOOTLOADER_PROFILE] SBL Total Time Taken : 77703us
Image loading done...
Starting RTOS/Baremetal applications
[IPC RPMSG ECHO] Remote Core waiting for messages from main core ... !!!
[IPC RPMSG ECHO] Received and echoed 10 messages ... !!!
All tests have passed!!