compiler library files

Questions and discussions about MISRA C not fitting under migration or rules forums

Moderators: misra-c, david ward

Post Reply
mshearer123
Posts: 14
Joined: Thu Feb 18, 2010 11:28 am
Company: TME

compiler library files

Post by mshearer123 » Fri Mar 12, 2010 10:31 am

Hi,
I am currently working on a Blackfin project, developing in VISUAL DSP++

I would like to bring this to MISRA, however if i use "include" files such as stdio.h or ccblkfn.h do they comply with MISRA?

I have tried to bring any include files into my local workspace so that logiscope can run through them aswell, this results in hundreds of violations from the files.

Can I claim MISRA compliance with these files? or is there an alternative route i.e. buying MISRA compliant librarys?

Thanks for any advice,

Matthew

William Forbes
Posts: 29
Joined: Wed Dec 17, 2008 9:48 pm
Company: TRW Automotive

Re: compiler library files

Post by William Forbes » Fri Mar 12, 2010 7:42 pm

There's a whole stack of rules related to "standard" librarys (section 6.20)
<stdio.h> is banned for production code.
But provided your other librarys comply with the rules and you obey the rules in section 6.20 then why should you not be able to clain compliance?
I guess you will have problems with rule 3.6!
However you can raise a deveation and document the facts about the compiler etc. and I guess still claim your code is compliant?
Rule 1.1 has some comments about low level code which may be relevant.

mshearer123
Posts: 14
Joined: Thu Feb 18, 2010 11:28 am
Company: TME

Re: compiler library files

Post by mshearer123 » Thu Mar 18, 2010 11:03 am

Another question relating to library files for a PIC project.

Microchip header files for each processor i.e. p24HJ128GP504.h contains an awful lot of unions. And extern variables to source I won't have.
Will these files therefore me MISRA non-compliant, meaning i would have to define my own header file to map registers etc?

thanks for any advice,

Matt

Post Reply

Return to “General Questions”