Add external tool for Lint software in NBEclipse IDE

Topics for the Eclipse Environment
JHaro
Posts: 4
Joined: Fri May 27, 2011 9:04 am

Add external tool for Lint software in NBEclipse IDE

Post by JHaro »

How can I add an external tool for Lint software in NBEclipse IDE?

I can't find external tool button in the IDE's Toolbars?
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Add external tool for Lint software in NBEclipse IDE

Post by tod »

See my blog entry Using Lint in Eclipse. There is also a third party tool called Visual Lint that offers several improvements, but it will set you back $199 for the standard edition (does not include a lint tool itself - I use it with Gimpel's PC Lint). You can search this forum for "Lint" and probably find multiple references.
JHaro
Posts: 4
Joined: Fri May 27, 2011 9:04 am

Re: Add external tool for Lint software in NBEclipse IDE

Post by JHaro »

Hi Tod,

I have taken a look in your blog, but in my Netburner IDE I can't find the External tool configuration utility.

Do you know how to add this option to the Netburner IDE toolbar?

Regards
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Add external tool for Lint software in NBEclipse IDE

Post by tod »

You should be able to right-click on a gray area of the tool bar and select Customize Perspective... from the contextual menu. In the dialog that opens, go to the Command Groups Availability tab. In the first column Available command groups: scroll down and check the box labeled External Tools. You may also need to go to the Tool Bar Visibility tab and enable the External tools button under the Launch Tool Bar Structure tree. Mine shows up with the name of the last external tool I ran but it's the last item under the Launch menu. I actually use the Galileo release of Eclipse rather than the bundled NBEclipse version so things may vary somewhat with your version.
JHaro
Posts: 4
Joined: Fri May 27, 2011 9:04 am

Re: Add external tool for Lint software in NBEclipse IDE

Post by JHaro »

Hi Tod,

Thanks for your help but unfortunally the NBEclipse Enviroment doesn't have "the box labeled External Tools". It doesn't have ToolBar Visibility too.

I'm thinking to move my project from NBEclipse to "pure" Eclipse IDE. What do you think? Is too much complicated? Have you found any help to do this?

Regards and thanks again for you help
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Add external tool for Lint software in NBEclipse IDE

Post by tod »

It's pretty simple to move from NBEclipse to the standard Galileo release. The Galileo release works better with the NB tools than the newer Helios release. (Indigo is supposed to be coming late next month.) See the Wiki page article I wrote up a while back on how to use the NBEclipse plug-ins to turn Galileo into your NB tool of choice.
JHaro
Posts: 4
Joined: Fri May 27, 2011 9:04 am

Re: Add external tool for Lint software in NBEclipse IDE

Post by JHaro »

Thanks Tod.

Now I have Eclipse Galileo IDE running Netburner software and LINT (Gimpel software)

Thanks again
vsabino
Posts: 32
Joined: Wed May 14, 2008 8:45 am

Re: Add external tool for Lint software in NBEclipse IDE

Post by vsabino »

Hi Tod,

I read this thread and your blog post, which I found very helpful!
Sadly, I still can't get PC-Lint to run.

I installed Eclipse Indigo 3.7, 32-bit.
I have the latest PC-Lint.
I use the Rel24_rc2 version of Netburner.
I configured Indigo to compile the Netburner code, I copied the plugins you list. This works fine. I compare a *_app.s19 record compiled in each version of Eclipse, and they are the same.

reading your blog post http://syncor.blogspot.com/2010/03/using-li ... urner.html
I got successfully to the point where you talk about "netburner.lnt".
I got a little confused with the "project.lnt" paragraph, specially with the part you mention the Environment tab. I believe this is something I will need to do only if I have my own libraries?

I definitely got stuck on "Common things that go wrong ", I try to lint the main.cpp file (or the entire project for that matter) and get the following error:

C:\lint\co-gcc.lnt 37 Error 307: Can't open indirect file 'gcc-include-path.lnt'

You mention doing some detective work. I read the "gcc-readme.txt" and it seems I have to generate those files myself first?

Can you provide some guidance to get over this hump?

Thanks,
Victor
User avatar
tod
Posts: 587
Joined: Sat Apr 26, 2008 8:27 am
Location: Southern California
Contact:

Re: Add external tool for Lint software in NBEclipse IDE

Post by tod »

Don't worry about the section on the Environment tab at first. You can just hard code the path to your include files if you want but that's not your problem. If you want more help on the environment tab just post again after we solve the immediate problem.

Without seeing your starting lint file (netburner.lnt?) I have to guess at what you did.
Somehow you are telling lint that you want to use a .lnt file named gcc-include-path.lnt. I suspect you have no such file. In the blog post my netburner.lnt file uses co-gnu3.lnt and then I specify all the the include paths by hand for the netburner. You probably found out that you're now supposed to use co-gcc.lnt. Using that file improves compatibility with more features of C++ but it requires some configuration, including running some tools to create gcc-include-path.lnt. Lucky for you I switched to using co-gcc.lnt a while back so to save you some effort here are the contents you need for gcc-include.path.lnt. Just create a new file with your favorite text editor, paste this in and then save the file under C:\lint (or wherever you stored your netburner.lnt file).

-------------------------- Copy all the lines below this one - don't include this line --------------
--i"c:\nburn\gcc-m68k\bin\../lib/gcc/m68k-elf/4.2.1/../../../../m68k-elf/include/c++/4.2.1"
--i"c:\nburn\gcc-m68k\bin\../lib/gcc/m68k-elf/4.2.1/../../../../m68k-elf/include/c++/4.2.1/m68k-elf"
--i"c:\nburn\gcc-m68k\bin\../lib/gcc/m68k-elf/4.2.1/../../../../m68k-elf/include/c++/4.2.1/backward"
--i"c:\nburn\gcc-m68k\bin\../lib/gcc/m68k-elf/4.2.1/include"
--i"c:\nburn\gcc-m68k\bin\../lib/gcc/m68k-elf/4.2.1/include-fixed"
--i"c:\nburn\gcc-m68k\bin\../lib/gcc/m68k-elf/4.2.1/../../../../m68k-elf/include"
--i"c:/nburn/gcc-m68k/lib/gcc/../../lib/gcc/m68k-elf/4.2.1/../../../../m68k-elf/include/c++/4.2.1"
--i"c:/nburn/gcc-m68k/lib/gcc/../../lib/gcc/m68k-elf/4.2.1/../../../../m68k-elf/include/c++/4.2.1/m68k-elf"
--i"c:/nburn/gcc-m68k/lib/gcc/../../lib/gcc/m68k-elf/4.2.1/../../../../m68k-elf/include/c++/4.2.1/backward"
--i"c:/nburn/gcc-m68k/lib/gcc/../../lib/gcc/m68k-elf/4.2.1/include"
--i"c:/nburn/gcc-m68k/lib/gcc/../../lib/gcc/m68k-elf/4.2.1/include-fixed"
--i"c:/nburn/gcc-m68k/lib/gcc/../../lib/gcc/m68k-elf/4.2.1/../../../../m68k-elf/include"
vsabino
Posts: 32
Joined: Wed May 14, 2008 8:45 am

Re: Add external tool for Lint software in NBEclipse IDE

Post by vsabino »

Hi Tod,

Thanks for your reply!
Before going further, I must say that between my call for help and your reply, I think I was able to get PC-Lint working with Eclipse. There's no way I could get it going without your blog post!
The people from Gimpel helped me get PC-Lint going in general, on the command line.

Yes, I agree the environment variables question can wait for later!

Answering your questions:
I copied the netburner.lnt contents you posted on your blog, and put the file into C:\Lint, but changed the call to co-gnu3.lnt to co-gcc.lnt and "-iC:\nburn\MOD5272\include" to "-iC:\nburn\MOD5282\include"

I read the "gcc-readme.txt" in the PC-Lint folder, and it says I must create the following files:
gcc-include-path.lnt
lint_cmac.h
lint_cppmac.h
size-options.lnt

The readme also kind of explains what to put in there.

I looked at the lines you list in your reply, for the gcc-include-path.lnt. Those lines are identical to what I have in the version I made. The only differences are:

your includes:
--i"c:\nburn\gcc-m68k\bin\../lib/gcc/m68k-elf/4.2.1/../../../../m68k-elf/include/c++/4.2.1/m68k-elf"
--i"c:/nburn/gcc-m68k/lib/gcc/../../lib/gcc/m68k-elf/4.2.1/../../../../m68k-elf/include/c++/4.2.1/m68k-elf"
versus my includes:
--i"c:\nburn\gcc-m68k\bin\../lib/gcc/m68k-elf/4.2.1/../../../../m68k-elf/include/c++/4.2.1/m68k-elf/m5208"
--i"c:/nburn/gcc-m68k/lib/gcc/../../lib/gcc/m68k-elf/4.2.1/../../../../m68k-elf/include/c++/4.2.1/m68k-elf/m5208"
Maybe the difference is in the Netburner release we are using?
I guess you put those lines into the netburner.lnt, instead of making the gcc-include-path.lnt? I'm curious how Lint can work then, if it needs for that file to exist?
What did you do regarding the other files I mention (required according to gcc-readme.txt)? I had to create them and place them in the project source file folder (I guess I can put them somewhere else later on). I'm curious on what other steps you took to make Lint work.

Anyway, now it seems to work. I do get plenty of messages on the console!
I tried limiting them to just the Errors and Warnings (-w2 option), but still there are too many. If I try linting the whole project (9 source files), the console does not contain the whole output.
I tried changing the Console output limit (default = 500); I put 100,000, but it still does not contain everything. Maybe the console has an internal limit?

Thanks again,
Victor
Post Reply