公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
小蜜风
Level 1
Level 1
First question asked First reply posted
调试过程中有时修改部分代码,经常出现IfxCpu_Trap_busError故障,导致单片机死机。什么原因可能导致这个故障?求大神帮忙解答下,不胜感激!
0 点赞
13 回复数
小柯
Level 4
Level 4
First like received 50 replies posted 25 replies posted
你需要把问题再细化一下,这样才容易让别人帮忙分析。
0 点赞
小蜜风
Level 1
Level 1
First question asked First reply posted
刚开始怀疑是三维数组识别不了,换成二维数组了,依然会报这个故障。后面屏蔽了程序中某一处调用的C语言库sizeof函数,又正常了。但是可能没有找到本质原因。谢谢
0 点赞
sjhdaflafjk
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted
遇到trap一般是代码书写不当,需要仔细检查了。
0 点赞
小蜜风
Level 1
Level 1
First question asked First reply posted
编译没有问题,程序烧录后,有时能跑一会,然后进Bus_Error
0 点赞
sjhdaflafjk
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted
有trap不代表编译通不过,有时候是因为非法读取地址数据,不触发的时候不会有bus_error。
0 点赞
sjhdaflafjk
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted
可以用劳德巴赫定位下哪个语句引起trap。
0 点赞
ZERO_GO
Level 6
Level 6
5 sign-ins Welcome!
mark
0 点赞
阳东
Level 5
Level 5
10 comments on blog 5 comments on blog First comment on blog
mark
0 点赞
liliWinner
Level 6
Level 6
500 replies posted 250 replies posted 100 replies posted
有没有stack trace
0 点赞
zkylwl
Level 2
Level 2
mark
0 点赞
龙在云端
Level 1
Level 1
First question asked First reply posted
可以查看核手册,根据trap代码定位出是哪一类的trap,然后对照代码debug
0 点赞
Jenny123
Level 4
Level 4
First like received 25 comments on blog 10 comments on blog
用Trace跟踪一下,比较容易找到问题点。
0 点赞
Hancen
Level 1
Level 1
今天我也遇到同样的问题!编译是没有问题的!需要单步调试,看看究竟是哪一个地方出的错。后来发现硬件配置错误,IO口用了LIN1的,但节点号却用了LIN3的。希望后面有遇到这样的问题的朋友,可以看看是不是配置错误。
0 点赞