当前位置:网站首页>Start the embedded room: system startup with limited resources
Start the embedded room: system startup with limited resources
2022-07-06 21:13:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm the king of the whole stack .
Start a program , It is electrically reset on the chip , To carry out , The block is independent of the operating system . Because the operating system needs to be loaded and booted by starting this module . So the English term of startup is boot loader. I am right. boot loader The definition of consists of two parts :1. load os 2. In order to make os It can perform the hardware and software initialization work normally .
We often see boot loader This word is used for arm guide linux,X86 guide windows wait . It can be seen that in a general sense . Can be used boot loader Are some strong computing power and plug-ins SDRAM Of SOC programme .
Let's understand the startup of embedded systems with limited memory resources ? So 51 For example .
51 system SOC Generally, it is built-in K Byte level nor flash Used to execute code , And built in a piece K Lower level ram For data reading and writing .
Obviously, such a system cannot run linux Such a tall system , that 51 What are you doing when you start ? Let's start with the program development process :
1) Code . compile . Link to a runnable file .
Generally in keil In the integrated environment .
2)keil Binary tools for ( similar gcc Of objcopy) explain 1) The executable in . extract code and data data , Generate with load address .HEX Format file . Remember the loading address , Not the execution address .
3) burning .HEX File data to nor flash. It is based on the loading address in the file . Generally speaking . The loading address and execution address of the code segment are the same . Only in this way can we nor flash Run up . however data It should be placed in the built-in ram The area can be read and written . however ram Power will disappear . therefore data Is to load into nor flash Of . namely data The execution address of is ram Area . The loading address is flash Area .
4) After power on reset . The boot code initializes the hardware , Like the clock , watchdog , Serial port and so on
5) Ready stack . And then put data From where it was loaded copy To ram Execution area of ( Link address )
6) Initialize well bss, And then jump The main program starts running .
Simple embedded systems generally do not os. It's the above process .
The amount of code of such a system is generally small , Put all in the built-in nor flash in . There is no plug-in nand flash perhaps card.
It can support read-write cards . But the code is only put into the built-in nor flash, Instead of putting it into an external card .
Actually 51 Can also be like arm Boot the operating system like that , Of course, the operating system not only requires memory , Yes CPU Computing power is also required , therefore 51 Is not competent to run linux Of .
But 51 It can also guide and run a simple operating system . such as UCOS wait . Only ram Big enough to .
So based on the 51 Of SOC The system can also look like S5PV210 In this way SOC The system of , The code is placed externally nand flash perhaps card in , Then the startup should become an independent module and U start-up COS、 The application is placed outside nand in . When powered on, first pass irom To load the startup code to iram in , Then run the startup code . And boot in the startup code os. See the next blog post for details .
Copyright notice : This article is the original article of the blogger , Blog , Do not reprint without permission .
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/117098.html Link to the original text :https://javaforall.cn
边栏推荐
- The most comprehensive new database in the whole network, multidimensional table platform inventory note, flowus, airtable, seatable, Vig table Vika, flying Book Multidimensional table, heipayun, Zhix
- Swagger UI tutorial API document artifact
- Nodejs tutorial expressjs article quick start
- 15million employees are easy to manage, and the cloud native database gaussdb makes HR office more efficient
- In JS, string and array are converted to each other (II) -- the method of converting array into string
- LLVM之父Chris Lattner:为什么我们要重建AI基础设施软件
- 什么是RDB和AOF
- Distributed ID
- 【Redis设计与实现】第一部分 :Redis数据结构和对象 总结
- Word bag model and TF-IDF
猜你喜欢
Pycharm remote execution
[redis design and implementation] part I: summary of redis data structure and objects
硬件开发笔记(十): 硬件开发基本流程,制作一个USB转RS232的模块(九):创建CH340G/MAX232封装库sop-16并关联原理图元器件
MLP (multilayer perceptron neural network) is a multilayer fully connected neural network model.
The most comprehensive new database in the whole network, multidimensional table platform inventory note, flowus, airtable, seatable, Vig table Vika, flying Book Multidimensional table, heipayun, Zhix
数据湖(八):Iceberg数据存储格式
1500萬員工輕松管理,雲原生數據庫GaussDB讓HR辦公更高效
2022菲尔兹奖揭晓!首位韩裔许埈珥上榜,四位80后得奖,乌克兰女数学家成史上唯二获奖女性
20220211 failure - maximum amount of data supported by mongodb
基于STM32单片机设计的红外测温仪(带人脸检测)
随机推荐
[MySQL] trigger
Forward maximum matching method
【OpenCV 例程200篇】220.对图像进行马赛克处理
El table table - get the row and column you click & the sort of El table and sort change, El table column and sort method & clear sort clearsort
Is this the feeling of being spoiled by bytes?
Deployment of external server area and dual machine hot standby of firewall Foundation
Yyds dry goods count re comb this of arrow function
Notes - detailed steps of training, testing and verification of yolo-v4-tiny source code
性能测试过程和计划
Laravel notes - add the function of locking accounts after 5 login failures in user-defined login (improve system security)
R language visualizes the relationship between more than two classification (category) variables, uses mosaic function in VCD package to create mosaic plots, and visualizes the relationship between tw
New database, multidimensional table platform inventory note, flowus, airtable, seatable, Vig table Vika, Feishu multidimensional table, heipayun, Zhixin information, YuQue
966 minimum path sum
The difference between break and continue in the for loop -- break completely end the loop & continue terminate this loop
代理和反向代理
[200 opencv routines] 220 Mosaic the image
KDD 2022 | realize unified conversational recommendation through knowledge enhanced prompt learning
15 millions d'employés sont faciles à gérer et la base de données native du cloud gaussdb rend le Bureau des RH plus efficace
硬件开发笔记(十): 硬件开发基本流程,制作一个USB转RS232的模块(九):创建CH340G/MAX232封装库sop-16并关联原理图元器件
【Redis设计与实现】第一部分 :Redis数据结构和对象 总结