This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28069: Using PC-Lint with CCSv8x

Part Number: TMS320F28069

Tool/software: Code Composer Studio

Hello All,

I wanted to share this since I've seen quite a few threads all claiming there isn't a way to do this - but I have PC-Lint from  Gimpel Software working with CCSv8.x.

Even though this isn't an optimal set-up, it works and I found it useful and I will share the procedure here.  Gimpel has a similar procedure posted on this page:   but there are some subtle issues with that since CCS is slightly different in this setup.

This explanation will help you get PC-Lint running under CCS.  
This explanation will not go into the cornucopia of options that are available with PC-Lint.  I do have a standard TI lint file for PC-Lint - I will attach a template for that in a follow up message.  Everyone has a different
application and different needs and requirements, so it's not within the scope of this explanation to select every option.  Maybe TI will be able to add to the ti_std.lnt or maybe make that available for some of the more popular processors with options that take into account the compiler macros, switches, etc.

First, make sure the External Tools is enabled by checking the following - as shown in the pic:

This is under Windows->Preferences.

Next - right click on the project and bring up Project Properties and bring up the Builders Menu selection:

Note, I've already added PC-Lint but that's what the window looks like - select New, Add PC-Lint, and then go to the edit screen:

The set up as shown in the above pic is fairly self-explanatory - I recommend putting the path to PC-Lint in your system path - here, I have PC-Lint installed on the "E:" drive and under location have:

E:\lint\lint-nt.exe

The Working Directory is set to the workspace of the file (or maybe files or project) where I want PC-Lint to do static analysis.

Arguments:

The first is the ti_std.lnt file, then the file (or maybe files to examine), and then output options - this is the part I'm still working on.

The first time I ran this, I had almost 6MB of output, and it overwhelms the console output window, so finding a way to send all of the output to a file is the right idea, then that can be browsed using the editor window.

There are a lot of config options here, the above is just an example to get you going in the right direction and serves as a good starting point.

Some caveats:

1) - The only way to currently add an external tool to CCS (that I've found), is to add to the builder options - so this means PC-Lint will be run every time a build is run, but that's a good thing I would think.  Under the build options you can change this to only run PC-Lint after a clean, or auto-build, there are some choices.

2) - I need to look at the choices for output - the console window only holds so much text, I'm not sure if that can be increased, but the best idea is to pipe out all of the output to a file - I've tried to show that, but it isn't working that well just yet, maybe that's an exercise for the user to figure out; but I'll probably post a better way for output soon.

Well, hope this helps some of you that want to include PC-Lint with CCS.

Regards,
John W.

  • Hello All,

    I've attached an example lint file for PC-Lint as discussed in the OP.

    ti_std_lint_file_template_lnt.txt
    //  TI CCS
    //  Standard lint options
    
    // following is file included with PC-Lint
    e:\lint\co-ti320.lnt
    // if any of the misra rules are to be included, as an example
    // e:\lint\au-misra1.lnt
    
    // some of the following options may not be appropriate
    e:\lint\options.lnt  +fem -mL -si2 -spN2 -spF4 -e830 -e773 +dccs_c2k
    // include files here - the more the better, PC-Lint will complain if it doesn't find something
    // for instance - the main include path of the compiler being used - any paths with spaces must be enclosed in quotes " "
    -iF:\ti\ccs8p1\ccsv8\tools\compiler\ti-cgt-c2000_18.1.2.LTS\include
    -iF:\ti\c2000\C2000Ware_1_00_05_00\libraries\calibration\hrpwm\f2806x\lib
    -iF:\ti\c2000\C2000Ware_1_00_05_00\libraries\math\IQmath\c28\lib
    -iF:\ti\c2000\C2000Ware_1_00_05_00\libraries\math\FPUfastRTS\c28\lib
    -iF:\ti\c2000\C2000Ware_1_00_05_00\device_support\f2806x\common\include
    -iF:\ti\c2000\C2000Ware_1_00_05_00\libraries\control\DCL\c28\include
    -iF:\ti\c2000\C2000Ware_1_00_05_00\libraries\math\FPUfastRTS\c28\include
    -iF:\ti\c2000\C2000Ware_1_00_05_00\device_support\f2806x\MWare
    -iF:\ti\c2000\C2000Ware_1_00_05_00\libraries\communications\usb\f2806x
    -iF:\ti\c2000\C2000Ware_1_00_05_00\libraries\communications\usb\f2806x\include\device
    -iF:\ti\c2000\C2000Ware_1_00_05_00\libraries\communications\usb\f2806x\include\host
    -iF:\ti\c2000\C2000Ware_1_00_05_00\device_support\f2806x\headers\include
    -iF:\ti\c2000\C2000Ware_1_00_05_00\device_support\f2806x\MWare\inc
    -iF:\ti\c2000\C2000Ware_1_00_05_00\libraries\calibration\hrcap\common\type0\include
    -iF:\ti\c2000\C2000Ware_1_00_05_00\libraries\calibration\hrpwm\f2806x\include
    -iF:\ti\c2000\C2000Ware_1_00_05_00\libraries\math\IQmath\c28\include
    -iF:\c28x_ControlStickRTOS\Themis\new_wsFreeRTOS_v9\blinky_f28034\include
    -iF:\c28x_ControlStickRTOS\Themis\new_wsFreeRTOS_v9\blinky_f28034\FreeRTOS\include
    -iF:\c28x_ControlStickRTOS\Themis\new_wsFreeRTOS_v9\blinky_f28034\FreeRTOS\portable\CCS\c28x
    
    // and, more lint options, again, this depends on what your project requires, you may want to 
    // enforce or relax some of these, please see the PC-Lint documentation for more details.
    
    	    // while processing compiler (library) header files ...
    -wlib(1)    // sets the warning level within library headers to 1
    	    // (no warnings, just syntax errors).  Comment out if you
    	    // are actually linting library headers.  This
    	    // option makes obsolete options of the form -elib(axxx) where
    	    // xxx >= 400 which may be retained for historical reasons.
    -elib(652)  // suppress message about #define of earlier declared symbols
    -elib(537)  // repeated include files
    -elib(677)  // sizeof used within preprocessor statement
    -elib(19)
    +e602
    +e406
    +rw(asm)
    +rw(_asm)
    +rw(__asm)
    

    Regards,
    John W.

  • Thanks John! Much appreciate you sharing your findings with the community!
  • Ki,

    Sure, NP - this was something I had meant to do a little sooner; maybe TI can modify CCS so that can be something that is clickable from the Run menu or somewhere else appropriate.

    Also, for the console window, there's a setting to not limit the output size, that seems to work OK - but I've cut down on the Lint output - I'm not sure how it'll do with my original setting where I was getting almost 6MB out after linting just one file.

    Regards,
    John W.
  • Ki,

    Can this post be made 'sticky'?  I think others will benefit and it appears to be a question that has been regularly asked.

    Thanks,
    John W.

  • Hello All,

    For those of you that may be running PC-Lint+ - the set up is similar as shown in the following pic:

    The lnt file set up is different between PC-Lint and PC-Lint+, I may post an example .lnt file for PC-Lint+ a little later.

    Regards,

    John W.

  • Ki,

    Did I goof the sticky pin somehow?

    Thanks,
    John
  • The sticky property must have expired. I can re-sticky it