AM261x MCU+ SDK: BOOTLOADER

| AM261x MCU+ SDK 26.00.00 |

BOOTLOADER

The Bootloader module provides APIs to write bootloader applications for various boot media like QSPI, UART, SOC memory etc.

# Features Supported

- QSPI Boot
- UART Boot
- API to parse multicore application image
- Separate APIs to boot self and non-self cores

# SysConfig Features

Note
  It is strongly recommend to use SysConfig where it is available instead of using direct SW API calls. This will help simplify the SW application and also catch common mistakes early in the development cycle.

- Bootloader instance name
- Boot Media to be used
- Boot Image offset

# Features not Supported

- None

# R5 Dual Core Support

- With the configuration used in MCU SDK to generate the app images, the RBL brings the R5 Lock Step Mode.
- The SBL runs on R5 core in Lock Step Mode.
- The SBL will switch to Dual core or continue in lock step mode depending on whether App Image loaded by SBL contains the R5 Core 1 image or not.
- If the App Image to be loaded contains the R5 core 1 binary
  - The SBL will configure R5 to switch to Dual Core Mode.
  - At the end of SBL flow, The Application image of R5 will start running in the dual core mode.
- If the App Image doesnot contain the R5 core 1 binary
  - The SBL will not configure R5 to switch to Dual core Mode
  - At the end of SBL flow, The Application image of R5 will start running in the lock step mode.
- Refer the IPC example which configures the R5 in Dual Core mode. IPC Notify Echo

# Example Usage

Include the below file to access the APIs

#include <stdio.h>
#include <drivers/bootloader.h>

Instance Open Example

gBootloaderHandle = Bootloader_open(0, NULL);
DebugP_assert(gBootloaderHandle != NULL);

Booting Cores Example

int32_t status = SystemP_SUCCESS;
/* Loading of segments done inside this API */
status = Bootloader_parseAndLoadMultiCoreELF(gBootloaderHandle, &gBootImageInfo);
Bootloader_profileAddProfilePoint("CPU load");
/* Run CPUs */
if (status == SystemP_SUCCESS && (TRUE == Bootloader_isCorePresent(gBootloaderHandle, CSL_CORE_ID_R5FSS0_1)))
{
status = Bootloader_runCpu(gBootloaderHandle, &gBootImageInfo.cpuInfo[CSL_CORE_ID_R5FSS0_1]);
}
if(status == SystemP_SUCCESS)
{
/* If any of the R5 core 0 have valid image reset the R5 core. */
status = Bootloader_runSelfCpu(gBootloaderHandle, &gBootImageInfo);
}

Instance Close Example

Bootloader_close(gBootloaderHandle);

# API

APIs for BOOTLOADING CPUs

Bootloader_isCorePresent
uint32_t Bootloader_isCorePresent(Bootloader_Handle handle, uint32_t cslCoreId)
API to check if a particular core's image is present in the multicore image.
Bootloader_parseAndLoadMultiCoreELF
int32_t Bootloader_parseAndLoadMultiCoreELF(Bootloader_Handle handle, Bootloader_BootImageInfo *bootImageInfo)
API to parse and load MCELF image.
Bootloader_close
void Bootloader_close(Bootloader_Handle handle)
Close bootloader driver.
Bootloader_runCpu
int32_t Bootloader_runCpu(Bootloader_Handle handle, Bootloader_CpuInfo *cpuInfo)
API to run a non-self CPU.
SystemP_SUCCESS
#define SystemP_SUCCESS
Return status when the API execution was successful.
Definition: SystemP.h:56
Bootloader_runSelfCpu
int32_t Bootloader_runSelfCpu(Bootloader_Handle handle, Bootloader_BootImageInfo *bootImageInfo)
API to boot self CPU.
TRUE
#define TRUE
Definition: os_defs.h:29
CSL_CORE_ID_R5FSS0_1
#define CSL_CORE_ID_R5FSS0_1
Definition: cslr_soc_defines.h:145
DebugP_assert
#define DebugP_assert(expression)
Function to call for assert check.
Definition: DebugP.h:187
bootloader.h
Bootloader Driver API/interface file.
Bootloader_open
Bootloader_Handle Bootloader_open(uint32_t instanceNum, Bootloader_Params *openParams)
Open bootloader driver.