我可以找到嵌入式C代码的分析工具吗?

编程入门 行业动态 更新时间:2024-10-26 14:27:25
本文介绍了我可以找到嵌入式C代码的分析工具吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

Hello, I want to know if there is a really good (yet free) software tool which can analyse my C code (which i have written based on PIC and 8051/52 controllers), can find possible coding mistakes and also check MISRA Compliance...

我尝试过的方法: 我知道PC_LINT,LINT,SPLINT .. 但是从未使用过它们。这些满足这些要求,如果它们是免费的还可以检查MISRA_C合规性吗?

What I have tried: I know about PC_LINT, LINT, SPLINT.. but never used them..do these fullfuil these requirements and if they are free and can also check MISRA_C compliance?

推荐答案

您将找不到一个好的免费代码分析工具。通常,代码分析包含在您编程的IDE中。 避免错误的最佳方法是拥有一些清晰,简单和简单的程序流程。应该在代码中的输入处检查参数(例如从内存中读取数据时)。 一个非常有用的步骤始终是一些同行评审。当你的同伴理解你的代码时,控制器也可能没问题。 没有代码分析消除你的程序错误 - 对于你需要用(已知的)边缘情况(如(-1,0,)或其他随机输入来编写一些测试函数。模糊测试也是一种选择,但它是一种需要大量准备的profi工具。 You wont find a good and free code analysis tool. Normally code analysis is included in the IDE in which you are programming. The best way of avoiding bugs is to have some clear, simple and plain program flow. The parameter should be checked at input in your code (like when data is read from memory). A very helpful step is always some peer review. When your peer understands your code than the controller may also be fine with it. No code analysis will eliminate the bugs your program - for that you need to write some test functions with (known) edge cases like (-1, 0, "") or other random input. Fuzzing is also an option but it is a profi tool which need a lot of preparement.

更多推荐

我可以找到嵌入式C代码的分析工具吗?

本文发布于:2023-11-16 04:28:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1600986.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:可以找到   嵌入式   代码   工具

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!