当前位置:网站首页>Embedded development: embedded foundation -- the difference between restart and reset
Embedded development: embedded foundation -- the difference between restart and reset
2022-06-23 21:36:00 【Guangdong embedded Education】
In use based on Eclipse Of IDE When debugging an embedded system , without doubt , The reader encountered reset and restart buttons in the debug perspective . At a high level , These two options may look the same , But there are important differences in when embedded developers should use restart instead of reset . Let's see how to use them in standard applications and when using boot loaders .

First , Let's discuss the basics and possible obvious issues . Pressing the reset button will cause the program to “ Power on reset ” Reset to application entry . When the reset button is pressed , Developers will find themselves in a processor reset handler . then , Developers can step through all the code , Including low-level initialization . After the application enters main A lot of things usually happen before .
If developers don't care main What happened before , Just want to restart the application and return to main, They can press the restart button . Restart is a combined operation . Results with the developer pressing the reset key and then using the main The breakpoint in the first line performs the same operation . Restart is sometimes defined as an application starting from an entry point .( Please note that , This is different from the boot entry point ).
secondly , For developers who use a single application in memory , Reset and restart seem almost the same , But if the developer has a boot loader and an application , That's what's interesting . During boot loader development , Embedded developers can use debugger commands to directly access the application code space . These commands may be similar to the following :
set $sp = *0x280000
set $pc = *0x280004
set {int}0xe000ed08 = 0x280000
These tell the debugger to set the stack pointer at startup 、 The program counter and interrupt vector table are set to a location other than the first location in memory . When executing these commands , Developers need to be aware of some interesting and useful things . The reset button still works as expected . Pressing it will return to the reset entry point , This will be the boot loader reset vector . however , If the developer presses the restart button , They will not reset after running . contrary , They will find themselves in the reset handler of the application code !
Developers who work only in a single application space rarely notice any difference between reset and restart . in fact , Most of them tend to restart . Embedded developers working in environments with boot loaders still tend to reboot to debug and use their applications , But resetting will also provide them with a way to enter the boot loader and debug the combined boot loader / The method of application .
边栏推荐
- [typescript] some summaries in actual combat
- Open source C # WPF control library ---newbeecoder UI drop down box
- Lightweight, dynamic and smooth listening, hero earphone hands-on experience, can really create
- Supplement to fusionui form component
- Full instructions for databinding
- 【5分钟玩转Lighthouse】快速使用长安链
- Global and Chinese market of roll up piano 2022-2028: Research Report on technology, participants, trends, market size and share
- Does FTP meet managed file transfer (MFT) requirements?
- 大一女生废话编程爆火!懂不懂编程的看完都拴Q了
- Spend small money to do big things: cloud function + cloud development leverages the practice of e-commerce promoting flexible architecture in CCTV evening party
猜你喜欢

Find My资讯|苹果可能会推出第二代AirTag,试试伦茨科技Find My方案

Lightweight, dynamic and smooth listening, hero earphone hands-on experience, can really create

Facing the problem of lock waiting, how to realize the second level positioning and analysis of data warehouse

Four aspects of PMO Department value assessment

Beitong G3 game console unpacking experience. It turns out that mobile game experts have achieved this

How PMO uses two dimensions for performance appraisal

Outlook开机自启+关闭时最小化

智能座舱SoC竞争升级,国产7nm芯片迎来重要突破

How to view the role of PMO in agile organizations?

数据可视化之:没有西瓜的夏天不叫夏天
随机推荐
Shanghai benchmarking enterprise · Schneider Electric visited benchmarking learning lean production, smart logistics supply chain and digital transformation
实验五 模块、包和库
蓝牙芯片|瑞萨和TI推出新蓝牙芯片,试试伦茨科技ST17H65蓝牙BLE5.2芯片
Gin security -3: fast implementation of CSRF verification
【Redis】有序集合的交集与并集
Xgboost implements text classification and sklearn NLP library tfidfvectorizer
[5 minutes to play lighthouse] quickly use Chang'an chain
[tutorial] Tencent lightweight cloud builds an online customer service chat system
Bi-sql index
Start /affinity specifies the number of vcpu to run OpenSSL speed to test the performance of a single vcpu
What about the cloud disk service status error? How to format the cloud disk service?
上线项目之局域网上线软件使用-----phpStudy
Bcdedit, used to adjust the machine startup parameters (safe mode, BootMenu display name, CPU, memory, etc.)
Go language limits the number of goroutines
New SQL syntax quick manual!
There is a 1GB difference between truncatememory and removememory
Process crash does not generate dump. Configure localdumps
Global and Chinese markets for e-cigarettes and tobacco vapors 2022-2028: Research Report on technology, participants, trends, market size and share
Prometheus primary body test
Supplementary usage of upload component in fusiondesign 1