当前位置:网站首页>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 .
边栏推荐
- Open source C # WPF control library ---newbeecoder UI drop down box
- 数据可视化之:没有西瓜的夏天不叫夏天
- 网上证券开户安全还是去营业部安全
- Gin security -3: fast implementation of CSRF verification
- 蓝牙芯片|瑞萨和TI推出新蓝牙芯片,试试伦茨科技ST17H65蓝牙BLE5.2芯片
- Uncover the secrets of Huawei cloud enterprise redis issue 16: acid'true' transactions beyond open source redis
- What is the process of opening a mobile card account? Is online account opening safe?
- Supplement to fusionui form component
- [etcd] etcd usage and cluster construction
- 同花顺股票开户是安全的吗?
猜你喜欢

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

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

实验五 模块、包和库

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

大一女生废话编程爆火!懂不懂编程的看完都拴Q了

发现一个大佬云集的宝藏硕博社群!

What are the main dimensions of PMO performance appraisal?

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

Steps for formulating the project PMO strategic plan

数据可视化之:没有西瓜的夏天不叫夏天
随机推荐
Do you really understand the cache penetration, cache breakdown and cache avalanche in rotten street?
Unusual transaction code mebv of SAP mm preliminary level
How to expand the capacity of ECS disk? What are the advantages of using cloud disk
How to create cloud disk service how to create cloud disk service backup?
How to view the role of PMO in agile organizations?
《scikit-learn机器学习实战》简介
Global and Chinese markets for e-cigarettes and tobacco vapors 2022-2028: Research Report on technology, participants, trends, market size and share
Bcdedit, used to adjust the machine startup parameters (safe mode, BootMenu display name, CPU, memory, etc.)
【5分钟玩转Lighthouse】快速使用长安链
How to define an "enumeration" type in JS
小程序ssl证书过期是什么原因导致的?小程序ssl证书到期了怎么解决?
Gradle asked seven times. You should know that~
Overview of digital circuits
Drawing STM32 minimum system schematic diagram with AD
数字电路概述
Global and Chinese market of fly killers 2022-2028: Research Report on technology, participants, trends, market size and share
Nodejs operation state keeping technology cookies and sessions
Copilot - employee, your layoff notice has been delivered
Markdown syntax summary
What if there are too few jetpack compose theme colors? Design your own color system