nRF51822调试时遇到的各种“奇葩”问题

前言:本人之前话说是做嵌入式开发的,但主要工作是做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.


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值