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

首先,让我们讨论基础知识和可能显而易见的问题。按下复位按钮会使程序在“开机复位”时复位到应用程序条目。当按下重置按钮时,开发人员会发现自己处于处理器重置处理程序中。然后,开发人员可以单步执行所有代码,包括低级初始化。在应用程序进入 main 之前通常会发生很多事情。
如果开发人员不关心 main 之前发生的事情,只是想重新启动应用程序并返回到 main,他们可以按下重新启动按钮。重启是一种组合操作。结果与开发人员按下复位键然后使用位于 main 第一行的断点进行操作相同。重新启动有时被定义为从入口点开始的应用程序。(请注意,这与开机入口点不同)。
其次,对于在内存中使用单个应用程序的开发人员来说,重置和重启似乎几乎相同,但如果开发人员有一个引导加载程序和一个应用程序,那就是有趣的地方。在引导加载程序开发期间,嵌入式开发人员可以使用调试器命令直接访问应用程序代码空间。这些命令可能类似于以下内容:
set $sp = *0x280000
set $pc = *0x280004
set {int}0xe000ed08 = 0x280000
这些告诉调试器在启动时将堆栈指针、程序计数器和中断向量表设置到内存中第一个位置以外的位置。当执行这些命令时,开发人员需要注意一些有趣且有用的事情。重置按钮仍按预期运行。按下它将返回到复位入口点,这将是引导加载程序复位向量。但是,如果开发人员按下重新启动按钮,他们不会在运行后重置。相反,他们会发现自己处于应用程序代码的重置处理程序中!
仅在单个应用程序空间中工作的开发人员几乎不会注意到重置和重新启动之间的任何区别。事实上,他们大多倾向于重启。在具有引导加载程序的环境中工作的嵌入式开发人员仍然倾向于重新启动以调试和使用他们的应用程序,但重置也将为他们提供一种进入引导加载程序和调试组合引导加载程序/应用程序的方法。
边栏推荐
- JS remove tabs and line breaks
- 【TypeScript】在实战中的一些总结
- JS namespace
- 同花顺股票开户是安全的吗?
- [JS 100 examples of reverse] anti climbing practice platform for net Luozhe question 5: console anti debugging
- Global and Chinese market of gas fire pit 2022-2028: Research Report on technology, participants, trends, market size and share
- The use of go unsafe
- Troubleshooting the problem that the channel cannot play after easycvr cascades to the upper platform
- Thinking about distributed system consensus
- How to create cloud disk service how to create cloud disk service backup?
猜你喜欢

New SQL syntax quick manual!

I am 30 years old, no longer young, and have nothing
![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

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

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

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

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

What are the main dimensions of PMO performance appraisal?
Application of JDBC in performance test

How PMO uses two dimensions for performance appraisal
随机推荐
What is a database index? Xinhua dictionary to help you
Processing of purchase return in SAP mm preliminary transaction code Migo
JS to get the screen size, current web page and browser window
JS delete object attribute
What hard disk does the ECS use? What are the functions of the ECS
Overview of digital circuits
Four aspects of PMO Department value assessment
How to view the hard disk of ECS? How about the speed and stability of the server
网上证券开户安全还是去营业部安全
Using clion to realize STM32F103 lighting LED
Salesforce heroku (IV) application in salesforce (connectedapp)
Summary of multiple methods for obtaining the last element of JS array
股票开户要找谁?网上开户安全么?
同花顺股票开户是安全的吗?
Encryption and decryption analysis of returned data of an e-commerce app (IV)
Full text search of MySQL
Copilot - employee, your layoff notice has been delivered
How does PMO select and train project managers?
[redis] intersection and union of ordered sets
SAP Migo mobile type 311 attempts to determine the batch, and the system reports an error -batch determination not Po