The application report is a comprehensive technical manual to leverage the ROM bootloader to boot applications or secondary bootloaders on Keystone II devices like 66AK2H14 and 66AK2E05. This document provides boot examples along with description of boot utilities and setting up TI supported evaluation platforms to test the sample software.
Additionally, some of the frequently asked questions are addressed around this topic along with additional references to Processor SDK in the SDK documentation on ti.com to design your system boot.
The document is meant to be used as an addendum document to ARM Bootloader User Guide for KeyStone II Devices. The Processor SDK also provides secondary bootloaders that enable developers to enable two stage application booting, which allows for customization of the system boot beyond the capabilities of the ARM® ROM bootloader
Code Composer Studio is a registered trademark of Texas Instruments.
ARM is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.
Linux is a registered trademark of Linus Torvalds in the U.S. and other countries.
All other trademarks are the property of their respective owners.
Keystone II bootloader overview and details are covered in the collateral and training slides mentioned below:
It is recommended that you review the material provided above before getting started with building the boot examples.
In order to download the software, execute the following in the git bash environment:
git clone git@git.ti.com:keystone2_boot_examples/keystone2_boot_examples.git boot_examples
Processor SDK RTOS or MCSDK 3.x (Legacy SDK)
MinGW for Windows with msys and make tools installed. OR Linux® machine with Ubuntu 12.04 LTS with wine utility.
TI Arm compiler (typically packaged with Code composer Studio).
NOTE
Ensure that the EVM has the latest UCD and BMC updates as described in the Setup Hardware section.
Figure 1 shows the directory structure for the software package. The examples directory is organized to follow the convention.
Device Name (k2h, k2e) ---> Boot Mode (eth, i2c,nand,spi, uart) ---> Example Type (singleStage, multiStage).
Detailed description of the directory structure is given below:
Source files:
Configuration files:
For Windows Environment: The top level directory in the software package contains a file setupMsysEnv that is used to set the path to the environment variables required to build the examples. Set the path to MinGW installation (TOOL_MINGW_DST), TI Arm compiler (ARM_COMPILER_FOLDER) and the platform development package (PDK_PACKAGES) and optionally to the uboot source directory.
NOTE
PDK_packages must point to path to the packages folder in the PDK directory.
For Linux Environment: The top level directory in the software package contains a file setupLinuxEnv that is used to set the path to the environment variables required to build the examples. Set the path to TI Arm compiler (ARM_COMPILER_FOLDER) and the platform development package (PDK_PACKAGES) and optionally to the uboot source directory.
NOTE
For Linux environment, using the boot utilities requires wine utility. If you do not have this installed, install the utility by executing following instruction on your Ubuntu machine.
sudo apt-get install wine
PDK_packages must point to path to the packages folder in the PDK directory.
Top level make file supports the following targets:
k2h_examples : Builds examples for K2H devices
k2e_examples : Builds examples for K2E devices
utils : Builds boot utlities
k2h_uboot : Builds uboot binaries for K2H devices
k2e_uboot : Builds uboot binaries for K2E devices
NOTE
In Linux environment, if you see errors related to environment variables, check your path to the tools. If that is accurate, ensure that you have saved the file in unix format.
:set fileformat=unix
:wq
The software packages contains two types of examples single stage boot examples and multistage boot examples.
Single stage boot examples demonstrate booting the K2 devices directly from the boot media specified by the boot mode pins using the default settings specified by the boot parameter loaded by the BootROM. For default boot parameter settings used by the bootROM, see the device-specific data manual. The sample application is designed to wake up the secondary Arm core upon boot and then initializes the UART to print message when each core wakes up. Each Arm core will send a message over UART: "Core n standing by..." where n is the Arm core number.
The multistage boot example demonstrates two stage booting the K2 devices using functions in BootROM call table. The first stage is loaded from the boot media specified by the boot switches using default bootROM parameter tables. The first stage code replaces the default fields in the boot parameter table and re-enters boot to load the second stage. This process is used in-order to modify the default boot process in cases where you need to speed up the boot speeds, boot from a different offset in the flash memory, load code into DDR memory or to perform time critical application specific initialization that may be required without waiting for the entire application to load. The second stage initializes wakes up secondary Arm core and initializes the UARTs and prints messages when each Arm core wakes up.
For details regarding the organization of the boot image for specific boot mode, see the makefile in the path examples/<device>/<peripheral>/multiStage.
SPI boot is a general-purpose boot mode in which the Boot ROM configures the PLL in bypass mode. The Boot ROM loads the image from the base of the SPI NOR flash. In the multi-stage boot example, the first stage loads the boot parameter table that forces the Boot ROM to configure the PLL and load the seconds stage at 100 Khz. The second stage is loaded at an offset of 0x1000 in the SPI NOR Flash.