Misra标准的嵌入式软件 [英] Misra standard for embedded software

查看:208
本文介绍了Misra标准的嵌入式软件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要求大量代码符合MISRA标准。

第一个问题:有人可以给出一个估计,用于传递基于嵌入式系统的良好代码经验。我明白写得很好并不清楚,所以我要求原始估计。

第二个问题:任何可以自定义的工具的建议(即允许抑制特定的警告)并用于自动构建环境(即命令行界面)

任何其他有用的建议,可以帮助这个任务。

谢谢Ilya。

I have a requirement to make a large amount of code MISRA compliant.
First question: Can somebody to give an estimation for passing well written code for embedded system based on experience. I understand that "well written" is poorly defined and vague so i ask for raw estimation.
Second question: Any recommendation for tool that can be customizable (i.e allowing suppress specific warnings) and used in automatic build environment (i.e command line interface)
Any other useful suggestions that can help with this task.
Thanks Ilya.

推荐答案

我也强烈推荐PC-Lint。如果您正巧使用Visual Studio编译代码,建议您使用Riverblade的插件Visual Lint。如果您无法在Visual Studio中编译代码,您仍然可以从命令行运行PC-Lint以获得良好的效果。

I also highly recommend PC-Lint. If you happen to be compiling your code with Visual Studio I recommend a plug-in 'Visual Lint' from Riverblade. If you cannot compile the code in Visual Studio, you can still run PC-Lint from the command line to good effect.

某些嵌入式系统编译器将作为编译器提供MISRA合规性测试警告。我使用IAR编译器进行Arm7 / Arm9开发。它在编译器设置中提供了一个易于配置的MISRA合规性检查表。

Some embedded system compilers provide MISRA compliance testing as compiler warnings. I use the IAR compiler for Arm7/Arm9 development. It provides an easy to configure MISRA compliance checklist right in the compiler setup.

很难想出一个经验法则来估计您需要的时间编写符合MISRA的编写代码。很大程度上取决于程序员的现有编码习惯,以及他们首先遵循MISRA规则的程度。

It is difficult to come up with a rule of thumb for estimating the time it would take you to make some well written code MISRA compliant. A lot depends on the existing coding habits of the programmers and how closely they follow the MISRA rules in the first place.

粗略估计:

2 - 3天以擅长PC-Lint使用。

创建现有代码MISRA的初始通行证:首先写入代码的时间的10%到25%

保持代码符合MISRA标准:将5到10%添加到代码开发中。这笔费用的一半是改变你的编程人员遵循MISRA方式的做法的习惯。另一半是代码测试和检查的额外费用,以确保符合MISRA。

Rough estimates:
2 - 3 days to become adept at PC-Lint usage.
Initial pass at making existing code MISRA compliant: 10 to 25 percent of the time spent writing the code in the first place.
Keeping code MISRA compliant: 5 to 10 percent added to code development. Half of this cost is changing the habits of your coders to follow the 'MISRA way' of doing things. The other half is the extra cost of code testing and inspection to ensure MISRA compliance.

这篇关于Misra标准的嵌入式软件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆