当前位置:网站首页>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
边栏推荐
- OAI 5g nr+usrp b210 installation and construction
- js中,字符串和数组互转(二)——数组转为字符串的方法
- @Detailed differences among getmapping, @postmapping and @requestmapping, with actual combat code (all)
- Reviewer dis's whole research direction is not just reviewing my manuscript. What should I do?
- 什么是RDB和AOF
- JS operation DOM element (I) -- six ways to obtain DOM nodes
- Statistical inference: maximum likelihood estimation, Bayesian estimation and variance deviation decomposition
- Data Lake (VIII): Iceberg data storage format
- OneNote in-depth evaluation: using resources, plug-ins, templates
- Pat 1085 perfect sequence (25 points) perfect sequence
猜你喜欢
2022 fields Award Announced! The first Korean Xu Long'er was on the list, and four post-80s women won the prize. Ukrainian female mathematicians became the only two women to win the prize in history
Study notes of grain Mall - phase I: Project Introduction
SAP Fiori应用索引大全工具和 SAP Fiori Tools 的使用介绍
2017 8th Blue Bridge Cup group a provincial tournament
Variable star --- article module (1)
审稿人dis整个研究方向已经不仅仅是在审我的稿子了怎么办?
[redis design and implementation] part I: summary of redis data structure and objects
3D face reconstruction: from basic knowledge to recognition / reconstruction methods!
【论文解读】用于白内障分级/分类的机器学习技术
Pinduoduo lost the lawsuit, and the case of bargain price difference of 0.9% was sentenced; Wechat internal test, the same mobile phone number can register two account functions; 2022 fields Awards an
随机推荐
Word bag model and TF-IDF
Aike AI frontier promotion (7.6)
OAI 5g nr+usrp b210 installation and construction
Vim 基本配置和经常使用的命令
LLVM之父Chris Lattner:为什么我们要重建AI基础设施软件
爱可可AI前沿推介(7.6)
【OpenCV 例程200篇】220.对图像进行马赛克处理
OneNote 深度评测:使用资源、插件、模版
Hardware development notes (10): basic process of hardware development, making a USB to RS232 module (9): create ch340g/max232 package library sop-16 and associate principle primitive devices
KDD 2022 | 通过知识增强的提示学习实现统一的对话式推荐
el-table表格——获取单击的是第几行和第几列 & 表格排序之el-table与sort-change、el-table-column与sort-method & 清除排序-clearSort
How to implement common frameworks
2017 8th Blue Bridge Cup group a provincial tournament
Seven original sins of embedded development
【mysql】游标的基本使用
JS operation DOM element (I) -- six ways to obtain DOM nodes
Introduction to the use of SAP Fiori application index tool and SAP Fiori tools
SAP UI5 框架的 manifest.json
Yyds dry inventory run kubeedge official example_ Counter demo counter
15million employees are easy to manage, and the cloud native database gaussdb makes HR office more efficient