Startup (Boot Loader) (Compact 2013)
3/26/2014
Some of the startup tasks performed by the BLCOMMON boot loader framework include initializing the CPU, clearing the instruction and data caches, clearing the translation look-aside buffers (TLBs), configuring and enabling the RAM controller, clearing the interrupts, and initializing the real-time clock (RTC). For more information, see Boot Loader Overview.
The following table describes the startup functions used by the BLCOMMON framework.
Purpose |
Function name |
---|---|
Initializes the CPU and SOC. |
|
Initializes hardware board-level logic, usually outside of the CPU and the SOC. |
|
Launches the run-time image. |
For a complete list of boot loader functions, see Boot Loader Reference.
The following figure shows the function call sequence for the boot loader until it passes control to the OAL.
The following is a description of the boot loader startup sequence shown in the preceding figure:
- The StartUp function is the entry point to the boot loader executable; it is the first function the boot loader executes. The StartUp function, which is typically written in assembly language, performs low-level hardware initialization.
- The StartUp function calls the BootloaderMain function, which is implemented in the BLCOMMON library, so you do not need to modify it. The BootloaderMain function performs further initialization of the hardware and calls several BSP functions, as described in the following list:
- The BootloaderMain function calls the OEMDebugInit function, which initializes the debug serial port by calling the OEMInitDebugSerial function. After the debug serial port is initialized, you can communicate with your device through a serial port connection by using a terminal emulator to display the boot loader’s output and accept your input.
- The BootloaderMain function then calls the OEMPlatformInit function to further initialize board-level hardware, such as an Ethernet controller.
- The BootloaderMain function calls the OEMPreDownload function, which you can customize to prompt for user input, such as to modify the network settings of an Ethernet controller. The OEMPreDownload function uses the BLMenu function to provide the user interface for the configuration.
- The BootloaderMain function then calls the DownloadImage function, which is implemented in the BLCOMMON library, to download the run-time image into RAM on the device. For an example of the functions that are called when the boot loader downloads the run-time image into flash memory, see Flash Memory (Boot Loader).
- Finally, the BootloaderMain function calls the OEMLaunch function to find and jump to the address of the first instruction of the run-time image. At this point, the boot process ends and the boot loader jumps to the OAL’s Startup function, which is the entry point of the run-time image. For more information about the OAL startup process, see Startup (OAL).