MISRA Discussion Forums
I comply with which rules - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA (https://forum.misra.org.uk/forumdisplay.php?fid=20)
+--- Forum: General Questions (https://forum.misra.org.uk/forumdisplay.php?fid=154)
+--- Thread: I comply with which rules (/showthread.php?tid=1043)



I comply with which rules - bschoi1984 - 27-03-2014

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


Re: I comply with which rules - MISRA Reply - 07-04-2014

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.


Re: I comply with which rules - Insane Vent Storm - 25-11-2015

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 ?