Embedded Linux Tour--burning and writing bare-metal program of environment construction

Source: Internet
Author: User

This section describes how to burn bare-metal programs using Oflash and Openjtag. Oflash also supports parallel-burning writing, similar to Openjtag. If you want to use Jlink burn write, need to install Segger J-flash tools, here we do not introduce more.

First, you need to install Oflash,oflash from the development board manufacturer or download from the Internet. Copy the Oflash to the "/usr/bin" directory by adding the executable permission . The command is as follows:

    sudo cp oflash/usr/bin/&& sudo chmod +x/usr/bin/oflash

The following is the specific burning process, we burn to write u-boot for example. First of all, U-boot is a bigger bare-metal program; second, it will be convenient to burn u-boot for our next section of writing system. We need to switch to the path where the U-boot.bin is located and execute the following command:

    sudo oflash u-boot.bin

The results of the implementation are as follows:

+---------------------------------------------------------+
| Flash Programmer v1.3 for Openjtag of Www.100ask.net |
| Openjtag is a USB to JTAG & RS232 tool based FT2232 |
| This programmer supports both of s3c2410x & s3c2440 |
| AUTHOR:EMAIL/MSN ([Email protected]), QQ (17653039) |
+---------------------------------------------------------+
Usage:
1. Oflash, run with cfg.txt or prompt
2. Oflash [file], write [file] to flash with prompt
3. Oflash [-F Config_file]
4. Oflash [Jtag_type] [cpu_type] [Flash_type] [read_or_write] [offset] [file]
Select the JTAG type:
0. Openjtag
1. Dongle JTAG (parallel port)
Enter the number:0

As shown above, I choose Openjtag, let's go on to choose:

Select the CPU: 1 . s3c2410x22

As shown above, I choose s3c2440x, let's go on to choose:

'ft2232' Interface usingLibftdi with'usb<=>jtag&rs232'Layout (1457:5118) Current Latency timer:2FTDI chip Type:2 "2232C"s3c24x0 detected, CpuID=0x0032409d[Main Menu]0: Nand Flash Prog1: Nor Flash Prog2: Memory RD/WR3: Exit Select the function to test:0

Choose to burn in NAND flash, of course, you can also choose to write in nor flash, and then choose:

0 3 8  - 0: NAND flash program 1: NAND flash Print blkpage            2: Exit                Select the function to test:0

Select write in NAND flash, option one is to read a portion of NAND flash, then select:

0x306ac0~2047Input target block number:0

There is the size of the bin file we want to burn, and let's choose which block to burn in, and choose to burn it in the No. 0, where it just started. Then began to burn, wait a moment to burn the success of writing.

Of course, if you are familiar with the process of burning writing, you can put the above process together in one command:

    sudo oflash 0 2 0 0 0 U-boot.bin

The next section will show you how to burn the entire system.

Embedded Linux Tour--burning and writing bare-metal program of environment construction

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.