当前位置:网站首页>嵌入式开发:嵌入式基础——重启和重置的区别
嵌入式开发:嵌入式基础——重启和重置的区别
2022-06-23 21:32:00 【粤嵌教育】
在使用基于Eclipse的IDE调试嵌入式系统时,毫无疑问,读者在调试透视图中遇到了重置和重新启动按钮。从高层次来看,这两个选项可能看起来相同,但在嵌入式开发人员何时应该使用重启而不是重置方面存在重要差异。让我们看看如何在标准应用程序中以及在使用引导加载程序时使用它们。

首先,让我们讨论基础知识和可能显而易见的问题。按下复位按钮会使程序在“开机复位”时复位到应用程序条目。当按下重置按钮时,开发人员会发现自己处于处理器重置处理程序中。然后,开发人员可以单步执行所有代码,包括低级初始化。在应用程序进入 main 之前通常会发生很多事情。
如果开发人员不关心 main 之前发生的事情,只是想重新启动应用程序并返回到 main,他们可以按下重新启动按钮。重启是一种组合操作。结果与开发人员按下复位键然后使用位于 main 第一行的断点进行操作相同。重新启动有时被定义为从入口点开始的应用程序。(请注意,这与开机入口点不同)。
其次,对于在内存中使用单个应用程序的开发人员来说,重置和重启似乎几乎相同,但如果开发人员有一个引导加载程序和一个应用程序,那就是有趣的地方。在引导加载程序开发期间,嵌入式开发人员可以使用调试器命令直接访问应用程序代码空间。这些命令可能类似于以下内容:
set $sp = *0x280000
set $pc = *0x280004
set {int}0xe000ed08 = 0x280000
这些告诉调试器在启动时将堆栈指针、程序计数器和中断向量表设置到内存中第一个位置以外的位置。当执行这些命令时,开发人员需要注意一些有趣且有用的事情。重置按钮仍按预期运行。按下它将返回到复位入口点,这将是引导加载程序复位向量。但是,如果开发人员按下重新启动按钮,他们不会在运行后重置。相反,他们会发现自己处于应用程序代码的重置处理程序中!
仅在单个应用程序空间中工作的开发人员几乎不会注意到重置和重新启动之间的任何区别。事实上,他们大多倾向于重启。在具有引导加载程序的环境中工作的嵌入式开发人员仍然倾向于重新启动以调试和使用他们的应用程序,但重置也将为他们提供一种进入引导加载程序和调试组合引导加载程序/应用程序的方法。
边栏推荐
- 同花顺开户是安全的吗?
- Talk about leap seconds
- JS to get the screen size, current web page and browser window
- 手机卡开户的流程是什么?在线开户安全么?
- How to define an "enumeration" type in JS
- Thinking about distributed system consensus
- Connect edgex gateway to thingsboard IOT platform
- [etcd] etcd usage and cluster construction
- Open source C # WPF control library ---newbeecoder UI drop down box
- Global and Chinese markets of natural starch 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢

How to view the role of PMO in agile organizations?
Application of JDBC in performance test

What are the main dimensions of PMO performance appraisal?
![Harmonyos application development -- mynotepad[memo][api v6] based on textfield and image pseudo rich text](/img/b1/71cc36c45102bdb9c06e099eb42267.jpg)
Harmonyos application development -- mynotepad[memo][api v6] based on textfield and image pseudo rich text

I am 30 years old, no longer young, and have nothing

Steps for formulating the project PMO strategic plan

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

How does PMO select and train project managers?

How to gradually improve PMO's own ability and management level

Beitong G3 game console unpacking experience. It turns out that mobile game experts have achieved this
随机推荐
[typescript] some summaries in actual combat
What are the advantages of attaching a virtual machine to a hard disk cloud server
Retrofit magic, reject duplicate code!
The new track of flagship chip is finally clear
Four aspects of PMO Department value assessment
How to gradually improve PMO's own ability and management level
【Redis】有序集合的交集与并集
Gin security -3: fast implementation of CSRF verification
同花顺股票开户是安全的吗?
Phpkf CMS 3.00 beta y6 remote code execution
Go local variables & global variables
Supplement to fusionui form component
Is it safe to open an account with flush?
[JS reverse hundred examples] anti climbing training platform for netizens question 6: JS encryption, environment simulation detection
How to convert []byte to io. in go Reader?
Bypass memory integrity check
Uniapp routing page Jump
How PMO uses two dimensions for performance appraisal
Game security - call analysis - write code
Global and Chinese market of fly killers 2022-2028: Research Report on technology, participants, trends, market size and share