RTSC XDC Module around SPLINT [message #710167] |
Thu, 04 August 2011 15:17  |
Eclipse User |
|
|
|
Hello,
We use RTSC and XDC to build our C code for various platforms.
I would like to use SPLINT to do static analysis on the code.
It would be good if I could write a XDC module around the SPLINT executable so that it can be consumed and easily used by other people.
Does anyone have information on how I could do this? Do I need to inherit ITarget? Is that the correct way to go?
Thanks,
Matt
|
|
|
|
|
|
|
|
|
|
|
|
Re: RTSC XDC Module around SPLINT [message #794132 is a reply to message #793614] |
Wed, 08 February 2012 18:56   |
Eclipse User |
|
|
|
On 2/8/2012 2:52 AM, Missing name Mising name wrote:
> Hello, sorry it has been 6 months without any contact.
>
> Hopefully, I'll be back on this soon.
>
> We created a IFilter that changes the compilation flags depending on if
> the file extension is .cpp or .c.
>
> This was because the ccOpts was -std=c99 and g++ doesn't like that!
>
> I can add the filter as an attachment, to show what we did, if you're
> interested.
>
> Do you think that it would be useful to make ITarget have separate
> options for different compilers.
So ... you have a package with a mix of C and C++ sources and you've
configured your target(s) to add -std=c99 (for the C code) but you can't
use this for C++ code (because g++ rightly complains), right?
>
> Something like ccOpts and cppcOpts?
>
This might be the best solution. The target certainly knows if the
source file is an asm, C, or C++ source file and it already has separate
asmOpts and ccOpts. So, it makes sense to add options specific to C++.
> I will be in contact about the splint and doxygen modules.
>
> I was thinking the would follow xdc.filters folder structure?
How about xdc.target.filters.[splint|doxygen]?
|
|
|
|
|
|
Re: RTSC XDC Module around SPLINT [message #895966 is a reply to message #802460] |
Mon, 16 July 2012 12:39  |
Eclipse User |
|
|
|
Sorry, for the long silence. I got moved onto another project - back now working with XDC and currently hitting the mixed C++ and C projects again.
The bug report is - create a hello world .cpp file.
Build it with XDC using copts.prefix = -std=c++11 (or 0x, 03, 98) and XDC will fail because it will invoke GCC with -std=c++11 but try to build it's own .c files with -std=c++11, which is obviously not allowed.
Sounds like ITarget3 is the correct solution. The C and C++ options need to be split up just like the C/C++ and ASM options are.
If I can be of any more assistance please ask!
|
|
|
Powered by
FUDForum. Page generated in 0.06151 seconds