About using the TFTP server in Windows to burn programs to the nand flash of the tq2440 Development Board (Solution to the blue screen !)

Source: Internet
Author: User

This is almost unavoidable because a blue screen always occurs during the use of USB downloads. After several blue screens yesterday, I decided to find other methods to burn the program and discard the USB download!

TFTP was the first to come up with a successful experiment. I wrote a blog and wrote down what I learned yesterday. By the way, thank you for your patience in guiding me yesterday!

In the first place, you must first shut down the computer's firewall ....

1. Use jlink to burn U-boot to nor flash. Note that the u- boot provided by TQ cannot be downloaded using TFTP, in my resources, there is a successful U-boot, that is, I used it yesterday.


2. Prepare the TFTP server (TQ is not used here and can be downloaded from my resources). decompress the package and open it directly. As shown in...


Here, you don't need to make any settings, just open it, and then minimize it to continue the next step.

3. Put the program you want to burn to the directory where the TFTP server is located,

Files such as UCOS. Bin zimage. Bin uboot. Bin can be burned to the development board. I put them in the directory where the TFTP server is located. By specifying the file name to be downloaded, the TFTP server downloads the corresponding file ....

4. Now, connect your Development Board to your computer using a serial cable (I use a USB to serial port), open securecrt (you can also use a Super Terminal), and then:


This is the command line interface of the U-boot I use.

5. set IP Address: Enter the print command on the serial port terminal to view some static variable information,


The two IP addresses need to be modified. First, you need to know the IP address of your computer (my computer sets a static IP address), and then set the IP address of the Development Board to the same network segment as the IP address of your computer.

Enter the command: Set ipaddr 192.168.1.6

Set serverip 192.168.1.10

Save

Input the preceding three commands in sequence, and then print,



Ipaddr is the Development Board IP, serverip is the computer ip, here my computer ip is 192.168.1.10 so the Development Board is set to 192.168.1.6


6. After setting the IP address, you can start to write programs.

Use a network cable to connect your Development Board to your computer. Then you can see that the network port indicator of the Development Board is on. The connection is successful. If the connection is not bright, restart the Development Board.

Note: every time you write a program to NAND Flash, you must erase it first!

Serial Port Terminal input command: NAND erase



After the data is erased successfully, print the environment variable to check the environment variable.

Now I want to burn the UCOS. binfile to the NAND flash of the Development Board.

Enter the command on the serial port terminal: TFTP 0x30000000 UCOS. Bin (detailed analysis of the command is provided later)


After the upload is successful, you will find a message in the TFTP server indicating that the sending is successful,

The following code can be burned into NAND Flash.

Enter the command: NAND write 0x30000000 0 0x300000


After writing the program successfully, you can now tune the Development Board to NAND Flash to start the program. Now you can see the UCOS operation and serial port terminal information.


OK. The above is the entire burning process. Now let's talk about the meaning of the specific command:

The above commands are all u-boot commands. You can view them by entering help!

Nand erase --- erased the entire NAND Flash.

TFTP 0x30000000 UCOS. bin ------ indicates the UCOS in the directory where the TFTP server is located. bind the file and upload it to the sdram of the development board. Because the SDRAM address of the Development Board starts from 0x30000000, enter 0x30000000. (Of course, you can also install other addresses of the SDRAM)

Nand write 0x30000000 0 0x100000 ------- 0x30000000 is the address from the program just burned to the SDRAM. 0 is the address from which the program is burned to the 0 address of the NAND Flash, 0x100000 refers to the size of the program to be burned (as long as it is set to be larger than the program to be burned)

In general, the content of the 0x1000000 Size Space starting from the SDRAM 0x30000000 address is written into the NAND Flash.


Well, this is the whole process. If there is any error, you can also look at your fingers!

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.