Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 3.6: Supplied Libraries Compliance Check
#1
We are using an ARM development suite where standard libraries are provided with the tool suite. Looking at the MISRA rules, I found quite a few which prohibit using such and such function (atoi, etc...). Which means that implicitly, the other functions can be used.
However, rule 3.6 requires that all libraries (including the ones provided with the compiler) be "subjected to appropriate validation".
Could you expand on what this means in regards to standard libraries? Do we need to require the vendor to certify he is MISRA compliant? If not possible, does this means we have to write our own version, so that we are sure it is compliant?
Thanks
Michel Campmas
Cypress Semiconductor
<t></t>
Reply
#2
If your implementation is a conforming freestanding implementation then the C99 language standard states that it must provide all the features associated with the headers , , , , , , and . For C90, the list is a little shorter. For a hosted implementation, it is all the headers defined by the standard.

Within these headers, MISRA C prohibits some functions because of known issues. As you say, anything else is implicitly OK to use, subject to appropriate validation having been performed.

The key word here is appropriate. This could mean that the compiler vendor certifies that the libraries are
MISRA compliant, possibly also providing you with evidence to back up the claim. Alternatively some vendors, particularly of embedded development kits, may provide you with the source code for the library in which case you can treat it in the same manner as your own source code.

The worst case scenario is, of course, that you may need to generate your own equivalents of some library functions.
Posted by and on behalf of the MISRA C Working Group
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)