Start the embedded room: System startup with limited resources

Source: Internet
Author: User

Start a program that is on-chip power-on reset to execute, blocks independent of the operating system while in. Because the operating system needs to be loaded and booted by starting this module. So the English term to start is boot loader. My definition of boot loader consists of two parts: 1. Load OS 2. In order for the OS to perform the necessary hardware and software initialization work properly.

We often see the word boot loader used for ARM boot linux,x86 boot windows and so on. Visible in the general sense. The ability to use boot loader are some of the SOC schemes that have strong computational power and plug-in SDRAM.

So let's get to know the startup of embedded systems with limited memory resources. Take 51 as an example.

51 system SoCs are generally built-in K-byte levels of nor flash for code execution, and a small K-level RAM is used for data reading and writing.

It is very obvious that such a system can not run a large system such as Linux, the 51 of the start is why? We start with the program development process:

1) Tap Code. Compile. Linked to a running file.

Generally in the Keil integration environment.

2) The executable file in the Keil binary tool (similar to GCC objcopy) explained in 1). Extract the code and data to generate the loaded address. Hex format file. Remember to load the address instead of the execution address.

3) Burn write. Hex file data to nor flash. It is based on the loading address in the file. Generally speaking. The load address and execution address of the code snippet are the same. So talent in nor flash run up. But DATA is to be placed in the built-in RAM area capable of reading and writing. But the ram power will disappear. So data is first loaded into nor flash. That is, the execution address of data is in the Ram area. and load the address in the Flash area.

4) after power-on reset. Startup code will be hardware initialized, such as clock, watchdog, serial, etc.

5) Prepare the stack. Then copy the data from the loaded place to the execution area of the RAM (link address)

6) Initialize the BSS, then jump to the main program and start running.

Simple embedded systems generally do not have an OS. is the process above.

The code for such a system is generally smaller, all placed in the built-in NOR flash. No plug-in NAND flash or card.

It can support read-write cards. But the code is only placed in the built-in nor flash, and not on the external card.

In fact, 51 can also be like arm boot operating system, of course, the operating system not only internal requirements, CPU computing power also has requirements, so 51 is not competent to run Linux.

But 51 can also guide and run a simple operating system. Like Ucos and so on. Only RAM is large enough to be able to.

So the SOC system based on 51 can also grow as a soc system like s5pv210, the code is placed in an external NAND flash or card, the boot will become a separate module and u start cos, the application is placed in the NAND in the external. When power-up, first load the boot code into Iram by Irom, and then run the startup code. and boot the OS in the boot code. See the next blog post for details.

Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.

Start the embedded room: System startup with limited resources

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.