How to enter embedded development [3]-install bootloader

Source: Internet
Author: User

When we get a blank board, how does our bootloader burn to flash? One way is to use a simulator. arm has a high-level simulator, and advanced products are good. However, we chose the poor method as a simulator. So what is it? A lot of online searches, jlink, openjtag, USB ..., there are many things, which are cheap in China (everyone knows ). According to the standard, these are actually called adapters. They are an interface, and they can be connected. By the way, they are the JTAG interface.

 

When I used to understand it, I thought it would be okay if I got connected? Who will burn it? CPU burning? Why? After reading the documentation, I learned that these CPUs generally have a debugging mode. In the debugging mode, there is an extra pin on the CPU, and the signals all go through this and communicate with the JTAG interface, we can use the JTAG interface to operate the CPU, Which is readable and writable.

 

If we want to read a register value, what signal should we send to the CPU? These are all in the CPU manual. I am not talking about this. What I want to say is that the predecessors have already written software to do these jobs. We don't have to worry about the signal we need, all we need is to pass a command in the past, such as read ADDR. There should be a lot of such software, and we chose openocd for opensource. This software is good, and developers are very diligent, maillist has many emails every day. If our CPU is within the range supported by the software, we need to write the configuration file. Otherwise, we need to write some CPU-supported CCode. The configuration file is mainly used to configure the CPU and flash Bank (address width is very important), so that the CPU can operate on flash, that is, you have to tell the CPU how to work, in fact, it is to set registers. When the software is running, the CPU needs to be suspended. Sometimes, the CPU cannot be suspended (some are for no reason, some are due to incorrect signals during reset, which has not been clarified yet, JTAG signal ), pause the MMU and then you can burn it. Everyone can watch the manual.

 

If bootloader is burned, it can be started. If the kernel or something is burned later, it seems that everyone is doing it through bootloader. So am I.

 

BTW: Flash burning, there is also a socket method, this flash is detachable, take it down, insert it into a dedicated writer, you can also complete the burning. I have not summarized other methods, and I have never used them.

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.