Processor SDK RTOS BOOT AM57x

1.The second bootloader(SBL)for AM57xx device initializes the execution environment for muti-core application .
Bootloader Execution Sequence
*Power On Reset
*RBL(Read Only Memory BootLoader),residing in ROM of Soc kickstarts.
*RBL checks boot mode setting and depending upon those settings, it copies boot loader from the respective memory device.
*SBL begins execution from internal memory by running basic initialization routines like setting up Stack, BSS and then jumps to main() to begin Board Initialization.
*Board Initialization is done by a call to Board_init() API.For additional details refer Processor SDK Board Support.
*It includes setting up PLLs, enabling clocks to all interfaces and modules, performing pinmux and setting up UART console.
*Once Board Initialization is complete, it enables clocks to the slave C66x/DSP cores and brings them out of reset.
*Parses Multicore Application image located in memory device and copies it to DDR memory based on load address for different sections.
*Once copy is successful it transfers control to application.
Application then starts executing from DDR.
*****Tools and Binary Formats************
This section lists out the various tools and scripts used by SBL for different boot modes and those required to create a bootable application image.
A bootable application image can be created by using the Am57xImageGen script provided under tools folder as part of sbl. It can be located at \packages\ti\boot\sbl\tools\scripts folder.
The Am57xImageGen script uses out2rprc and multicoreImageGen format conversion tools to create the final application image.
The script creates the bootable image in 2 steps.
RPRC format conversion
Firstly, application executable is converted from ELF/COFF format to custom TI RPRC image format.
Multicore Image file generation.
RPRC files for each cores is combined into a single multicore bootable application image.
Refer section App Image Creation for more details on usage of this script and application image creation.
To generate the MLO, SBL uses tiImageGen tool to prepend the sbl.bin image with the TI header information.
SBL provides a CCS based qspi flash writer utility to flash image and multicore AppImage from a SD card to onboard QSPI device. It is located at \packages\ti\boot\sbl\tools\flashWriter\qspi
Booting Via SD Card
Preparing the SD card.
Booting the target.
Preparing the SD card
To boot the target the SD card should be bootable. Follow the steps at Creating bootable SD card in windows or Creating bootable SD card in Linux.
Delete the “MLO” and “app” in the bootable SD card which are created in the process of making the SD bootable.
Copy the sbl binary(MLO) to the SD card.
Copy the Application image(app) generated using the Script to the SD card.
Booting the target
Insert micro SD card into the SD card slot of the board.
Open a serial communication terminal like TeraTerm, MiniCom on host PC and connect to the UART console port
Do a power reset of the board to boot the appliation from the SD card.
Booting Via QSPI
Booting from QSPI flash involves two steps-
Flashing bootloader and app image to QSPI flash.
Booting the target.
Preparing Flash Device
Use the CCS based qspi_flash_writer.out utility provided in \packages\ti\boot\sbl\tools\flashwriter\qspi\’ to flash the SBL image at offset 0 and application image at offset 0x80000 to the QSPI device.
QSPI device Memory Map:
Offset 0x00 SBL
Offset 0x80000 Application Multicore Image
The images can be flashed into QSPI flash by following steps given below.
Copy QSPI mode SBL image TI_PDK_INSTALL_DIR\packages\ti\boot\sbl\binary\\qspi\bin\MLO and application image(app) generated using the Script into the SD card.
Rename the bootloader file to ‘boot’ and application image to ‘app’ with no extensions.
Copy ‘config’ file into the SD card, the config file should contain names of the image to be flashed and the offset.
A sample config file can be found at TI_PDK_INSTALL_DIR\packages\ti\boot\sbl\tools\flashWriter\qspi\config. Do not change the name of the config file.
NOTE: “config” file can be used without any modifications if bootloader and application images are renamed to “boot” and “app”.
NOTE: Do not rename the bootloader to be copied to SD card as “MLO”, as MMCSD bootloader expects “MLO” and “app” to boot.
Now SD card contains 3 files 1)boot 2)app 3)config files.
config file contains the address of boot image as 0x0 and app image as 0x80000.
Insert it into the SD card slot.
Connect the board with CCS and and load the prebuilt qspi flash writer application from $(TI_PDK_INSTALL_DIR)\packages\ti\boot\sbl\tools\flashWriter\qspi\bin\\
Run the QSPI flash writer application. You will see the following logs on the EVM’s UART console.
After the images have been flashed to the QSPI device disconnect from CCS and do a power reset to boot from the QSPI memory.

你可能感兴趣的:(ethercat,sdk,bootloader)