I comply with which rules

Questions and discussions about MISRA not specific to a particular publication

Moderator: david ward

Post Reply
bschoi1984
Posts: 1
Joined: Thu Mar 27, 2014 9:03 am
Company: MDStec

I comply with which rules

Post by bschoi1984 » Thu Mar 27, 2014 1:09 pm

I have mixed feeling for comply with MISRA-C 2004 because I use Autocode generator such as TargetLink and I think it is reasonable that they make efforts to comply with MISRA-AC such as MISRA-AC ACG, MISRA-AC TL and MISRA-AC SLSF.

So I don’t know which stand (MISRA-C or MISRA-AC) I have to conform to.
I want to know which standard the people using hand-coding comply with and the people using MBD(Model-based development with AutoCode Generator) comply with.
If possible, please give me some opinions

MISRA Reply
Posts: 52
Joined: Mon Dec 06, 2004 12:24 pm

Re: I comply with which rules

Post by MISRA Reply » Mon Apr 07, 2014 1:16 pm

Modelling and coding guidelines should be selected for a project as appropriate for the development context of that project, including the requirements of the applied industry standards (such as IEC 61508 or ISO 26262). Many such standards advocate the application of a suitable language subset, and in ISO 26262 for example these requirements apply regardless of whether the “language” is an imperative programming language such as C, or a graphical modelling language. MISRA C guidelines provide one such subset, and for hand-coded projects this could be the sole source of reference.

When an auto-code generator is used to generate C code from a model-based design, then further guidelines may be selected but still with MISRA C as the basis. Modelling guidelines such as MISRA AC GMG and MISRA AC SLSF may be applied at the model level and MISRA C applied on the generated code. However, some MISRA C guidelines are written with the intent of protecting against many of the common mistakes made by a human code generator. When an auto-code generator is applied then it can be reasonably argued that some of the MISRA C guidelines can be relaxed where a tool can be expected to systematically and consistently “do the right thing.” MISRA AC AGC provides guidance on how generated code should comply with MISRA C:2004. Where MISRA C:2012 is applied then the AGC guidance is integrated into the document itself in Appendix E.

Insane Vent Storm
Posts: 4
Joined: Mon Nov 09, 2015 7:41 am
Company: MBDA UK Ltd

Re: I comply with which rules

Post by Insane Vent Storm » Wed Nov 25, 2015 8:23 am

On the general subject of MISRA compliance and auto-code, is anyone out there using a code generating tool to produce MISRA C++ 2008 compliant code ?

Post Reply

Return to “General Questions”