Dm355 Boot Mode, Nand boot, UART boot

Source: Internet
Author: User

Http://blog.csdn.net/dog0138/archive/2008/11/29/3400915.aspx


Dm355 has two startup modes, which are determined by the btsel [1:0] pin.

The first is to start asynchronous EMIF (aemif) from the off-chip device.
Device startup

// What do I think is it from nor flash?

The second method is to start from the on-chip ROM and execute the ROM Boot Loader (RBL) in the Rom. RBL supports three types of On-Chip media. btsel determines which media The RBL starts.

-Btsel [1:0] = 00-arm NAND boot
-Btsel [1:0] = 10-arm MMC/SD boot
-Btsel [1:0] = 11-arm UART boot

Now select to start from the off-chip NAND. The specific step of this startup method is that RBL first starts UBL (user boot
(Copies a second stage user boot loader (UBL) from
NAND Flash to arm internal RAM (AIM) and transfers control to
User-Defined UBL), and then execute, UBL takes the remaining data from NAND into the DDR and jumps to it.

// In fact, this is similar to the three-star startup mode, except that most chips are assembled and copied in C language, which is also called UBL.


There are two types of code in NAND: UBL and App. How does RBL find UBL, the original storage of UBL and app in NAND must conform to a certain format. the first page of the stored UBL or app code is specially used to store an information header. The format of this information header is as follows:

/* Some of the parameters are modified runtime */
Unsigned int ubldesc [] = {
0xa1aced00, // magic number
0x00000020, // entry point for the UBL
0x00000007, // No. of pages for the UBL code
0x1, // starting block of UBL in NAND
0x1 // starting page of UBL in NAND
};

/* Some of the parameters are modified runtime */
Unsigned int appdesc [] = {
0xb1aced22, // magic number
0x0000000a, // start block in NAND
0x81080000, // start address in DDR
0x81080000, // entry point
0x00000200, // No. of pages for the complete application
0x00000000 // compression flag
};

This information header contains information such as the starting address and entry point when the program is loaded. When dm355 is reset, the code on the On-Chip Rom
Controller initialization and searching for UBL magic number in NAND
(As agreed in advance), copy UBL into the on-chip RAM (0x00000020, // entry point
The
UBL // This can be changed
), And then execute the code. The UBL code is provided on the CD. Its mechanism is the same as that of RBL, but this UBL is for uboot. If you do not know how to execute uboot, it will execute your own code, you need to convert the out file compiled by CCS into a binfile and download it to NAND.


Summary: What is stored in NAND: UBL, uboot, Linux kernel image uimage, and file system.

The first two downloads are carried out using nand_programmer. The nand_programmer code is also available on the CD, that is, a program running in DDR. The input UBL and uboot files are added with the Information header and stored in NAND.

You can use uboot to download the last two files.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.