nRF51822调试时遇到的各种“奇葩”问题
2016-12-28 14:34
232 查看
前言:本人之前话说是做嵌入式开发的,但主要工作是做C++开发的,因为我们的嵌入式的复杂逻辑都是用C++写的,C++代码在PC端跑,嵌入式板的代码调试都是盲调或者通过串口输出进行调试,嵌入式的代码从没进行过断点的调试,因为整个公司的不用,不用的原因很简单,因为基本的部分已经写好并且蛮成熟的了。因此本人对嵌入式的断点调试经验空白可想而知。现切入到另外一款单片机进行开发,调试时遇到的一些“奇葩”问题,本人不知道真正的原因所在,尽管通过各种方式,规避了问题。下面我就奉上我遇到的部分Debug问题,最终在官方的用户手册里找到了答案,在官方的Troubleshooting部分,找到答案之后,心里瞬间踏实了不少!
18、The debugger seems to freeze while debugging.
答:If running a SoftDevice that has been programmed with the “Lock SoftDevice from Read back” enabled (see section
section 6.1 on page 27, the debugger will halt while stepping to an SVC instruction. You should set the
breakpoint after the SVC instruction and run the application to the breakpoint, or step over any SVC instructions. See
section 7.1.2 on page 41 for more details.
19.Software gets out of sync while debugging
答:Setting/modifying breakpoints on a running system using the SEGGER debugger will halt the CPU, which may
result in software that is out of sync. You should avoid setting breakpoints while the system is running.(不要在运行时设置断点或者更改断点,使用SEEGER调试)
20.The debugger does not halt on breakpoints.
答:Some Keil projects in the SDK have
Optimization level 3 (-03)
and Optimize for time
checked. If you are debugging an application with these settings, your breakpoint set might have no effect.
1. Press Alt+F7
to open the Target options dialog.
2. Select C/C++.
3. Select Optimization level 0
from the scroll down list.
4. Uncheck Optimize for time.
18、The debugger seems to freeze while debugging.
答:If running a SoftDevice that has been programmed with the “Lock SoftDevice from Read back” enabled (see section
section 6.1 on page 27, the debugger will halt while stepping to an SVC instruction. You should set the
breakpoint after the SVC instruction and run the application to the breakpoint, or step over any SVC instructions. See
section 7.1.2 on page 41 for more details.
19.Software gets out of sync while debugging
答:Setting/modifying breakpoints on a running system using the SEGGER debugger will halt the CPU, which may
result in software that is out of sync. You should avoid setting breakpoints while the system is running.(不要在运行时设置断点或者更改断点,使用SEEGER调试)
20.The debugger does not halt on breakpoints.
答:Some Keil projects in the SDK have
Optimization level 3 (-03)
and Optimize for time
checked. If you are debugging an application with these settings, your breakpoint set might have no effect.
1. Press Alt+F7
to open the Target options dialog.
2. Select C/C++.
3. Select Optimization level 0
from the scroll down list.
4. Uncheck Optimize for time.
相关文章推荐
- 我的stm32调试倒立摆的时候遇到奇葩小问题
- Appium 安装时遇到的各种奇葩问题
- Eclipse 添加CardView遇到的各种奇葩问题
- 搭建集群时遇到各种奇葩问题的大招~~
- Android Studio升级到2.3.3的遇到各种奇葩问题的万金油解决办法
- 新学习JAVA,记录遇到的各种奇葩问题
- 编写Makefile中遇到的各种奇葩问题汇总
- zabbix编译安装时遇到的各种奇葩问题,罗列出来。
- 阿里云----------阿里云服务器使用过程中遇到的各种奇葩问题以及解决渠道
- 【不算奇葩的问题】MDK调试stm32遇到BEAB BKPT 0xAB,重定向printf的BUG
- VC++调试中遇到的各种简单问题(一)
- VisualStudio用IE8调试时遇到的问题(转)
- 调试Release模式下遇到的问题 - Debug和Release的差异。
- 控件调试时遇到的一个问题
- 在windows下调试线程本地存储(TLS)时遇到的一个问题
- 完全实现 各种变态路径的解压缩,支持在 Web 上运行(在数字签名中遇到的问题,想到了用这种写法)
- eVC编程遇到的各种问题之——串口相关
- VS2008调试中遇到源文件与模块生成时的文件不同的问题
- 如题,我用的是vs2008(测试版)和UltraEdit-32 version 12.10我一运行或者调试web 程序就会遇到这个问题
- 笔记--调试C程序时遇到的问题