Introduction
This bootloader does SOC initializations and attempts to boot a multicore appimage file named "app" present in the first FAT partition found in the connected SD card. The file can be copied to the SD card by connecting it to the host PC using a card reader. Make sure that it is named "app" without any file extension. If the card is new, make sure that it is formatted with FAT32/16.
If a multicore appimage file is found at the location, the SBL reads the file into a buffer and parses it. Each core is then initialized, application image is loaded, entry points are set and the core is released from reset. For more on bootflow/bootloaders, please refer Understanding the bootflow and bootloaders
This bootloader runs in three steps:
- Format the SD Card with FAT32/16 (this is necessary if the card is new) and paste the *.appimage / *.mcelf image of desired application in the first FAT partition found in the Connected SD card. For connecting the SD Card to the host PC use a card reader. Make sure that the pasted file is named "app" without any file extension.
- Flashing the SBL SD at offset 0x0 (Setup the EVM in UART Boot Mode, Basic steps to flash files). For flashing the SBL use the
default_sbl_sd
configuration file present in tools/boot/sbl_prebuilt.
- Switch to OSPI BOOT MODE and Connect to UART in 5 seconds to see logs from UART
SBL SD Flow Overview
- Note
- RPRC image booting using SBL would be deprecated from SDK 11.00 release onwards. MCELF would be the default boot image format supported by SBL going forward.
SBL SD MULTICORE ELF
To parse and load an mcelf file via SD bootloader, use the project examples/drivers/boot/sbl_sd_multicore_elf
When an mcelf image is received, the SBL parses it, loads each segment to its respective core. Then the core is released from reset.
The steps to run the example is same irrespective of the image format.
Supported Combinations
Parameter | Value |
CPU + OS | r5fss0-0 nortos |
Toolchain | ti-arm-clang |
Boards | am263px-cc, am263px-lp |
Example folder | examples/drivers/boot/sbl_sd |
Steps to Run 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 an SD card 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.
See Also
BOOTLOADER
Sample Output
Logs from IPC RPMSG ECHO example:
Starting SD Bootloader ...
[BOOTLOADER_PROFILE] Boot Media : SD Card
[BOOTLOADER_PROFILE] Boot Image Size : 183 KB
[BOOTLOADER_PROFILE] Cores present :
r5f1-1
r5f1-0
r5f0-1
r5f0-0
[BOOTLOADER PROFILE] System_init : 368us
[BOOTLOADER PROFILE] Drivers_open : 280357us
[BOOTLOADER PROFILE] LoadHsmRtFw : 44us
[BOOTLOADER PROFILE] Board_driversOpen : 405us
[BOOTLOADER PROFILE] File read from SD card : 240375us
[BOOTLOADER PROFILE] CPU load : 16916us
[BOOTLOADER_PROFILE] SBL Total Time Taken : 538468us
Image loading done, switching to application ...
[r5f0-1] 0.001077s : [IPC RPMSG ECHO] Remote Core waiting for messages from main core ... !!!
[r5f1-0] 0.001073s : [IPC RPMSG ECHO] Remote Core waiting for messages from main core ... !!!
[r5f1-1] 0.001068s : [IPC RPMSG ECHO] Remote Core waiting for messages from main core ... !!!
[IPC RPMSG ECHO] Message exchange started by main core !!!
[IPC RPMSG ECHO] All echoed messages received by main core from 3 remote cores !!!
[IPC RPMSG ECHO] Messages sent to each core = 100000
[IPC RPMSG ECHO] Number of remote cores = 3
[IPC RPMSG ECHO] Total execution time = 6349363 usecs
[IPC RPMSG ECHO] One way message latency = 10582 nsec
All tests have passed!!