JLINK burns bind files to nand, norflash, and SDRAM

Source: Internet
Author: User
Tags jlink

1. Brief Description
The debugging and Flash burning functions of JLink are powerful, but it is difficult to perform Flash operations on S3C2410 and S3C2440: You need to set SDRAM when burning or Flash; otherwise, the speed is very slow; burning and writing Nand Flash can only be achieved theoretically, but no one has implemented it directly.
In this article, an indirect method is used to burn or write non-Nand Flash on the S3C2410 and S3C2440 development boards. The principle is: JLink can easily read and write the memory and start the program, so you can download a special program to the SDRAM on the Development Board and run it, then use this program to burn and write.

2. Procedure
2.1 connect jlink and start Jlink GDB server. Start the Development Board.
2.2 run J-Link commander
2.3 download and run a special program
For the 10000000 processor, they have 8 KB of SRAM internally. When Nor Flash is used for startup, the physical address of norflash is 0 x, and the startup is mapped to address 0; when Nand Flash is enabled, the address is 0.
Generally, MB of SDRAM is added to the cloud6410 Development Board. Before the SDRAM can be used, it must be initialized.
Therefore, first put an init. bin is downloaded to the internal SRAM to run. It executes the initialization of the SDRAM, and then downloads a large program, such as u-boot to the SDRAM, it implements the Nor and Nand Flash operations.
Here is the command in J-Link commander, assuming init. bin and u-boot.bin are under e: disk.
1. Speed 12000 // set the TCK to 12 Mb, and the program will be downloaded soon.

2. download and run init. Bin, which is used to initialize the SDRAM
2.1 For NAND boot:
Loadbin E:/init. Bin 0
Setpc 0
G
2.2 If nor is Enabled:
Loadbine:/init. Bin 0x10000000
Setpc 0x10000000
G

3. Download The Special uboot:

H
Loadbin E:/u-boot.bin 0x57f80000
Setpc 0x57f80000
G

// The range of the 50000000 mb sdram address is 0 x-0x57ffffff. Download To 0x57f80000, and the size of KB is available, so no overflow occurs.

After U-boot has been started, you can download files through the network or serial port, and then run the commands in U-boot to download and write files.
2.4 use U-boot to burn flash
For example, if you want to burn a program named LEDs. bin to nor or NAND Flash, refer:
(1). Download through jlink:
Run the command in J-link commander and put the program into SDRAM to run:
H
Loadbin E:/LEDs. Bin 0x50000000
G

Note the LEDs. bin size.

(2). Write to nor flash through U-boot:
Run the following command in U-boot:
Protect off all // unlock
Erase 1000000 10030000 // erase the nor flash sector whose size starts from 10000000 and ranges from 0 x (the size can be an integer multiple of the erased blocks. You can run the flash info command to view the size)
CP. B 0x50000000 10000000 10030000 // burn the program downloaded to 0x30000000 and write it to nor.

(3). Write to NAND flash through U-boot:
Run the following command in U-boot:
Nand erase 0 30000 // erase the nnad flash sector whose size starts from 0 to 0x30000
Nand write. jffs2 50000000 0 30000 // burn the program downloaded to 0x30000000 and write it to NAND.

Note that the above 30000 and other numbers are 192 K. If your program is small, set it on your own.

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.