失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > nRF51822调试时遇到的各种“奇葩”问题

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

时间:2023-03-29 09:05:36

相关推荐

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 (seesectionsection 6.1 on page 27, the debugger will halt while stepping to an SVC instruction. You should setthe breakpoint after the SVC instruction and run the application to the breakpoint, or step over any SVCinstructions. Seesection 7.1.2 on page 41for 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, whichmay 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 haveOptimization level 3 (-03)andOptimize for timechecked. If you aredebugging an application with these settings, your breakpoint set might have no effect.

1. PressAlt+F7to open the Target options dialog.

2. SelectC/C++.

3. SelectOptimization level 0from the scroll down list.

4. UncheckOptimize for time.

如果觉得《nRF51822调试时遇到的各种“奇葩”问题》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。