Hi,
We are attempting to run PC-Lint (version 8.00u) on our Keil project which uses the RL-ARM Real-Time Library Version V3.24.
We have set up PC-Lint to use the latest example PC-Lint Configuration File for the CARM Compiler as downloaded from Keil's web-site. File name:CO-RV.LNT
Lint reports the following error in RTX's rtl.h header file.
C:\Keil\ARM\RV31\INC\rtl.h(351,7): Error 129: declaration expected, identifier 'FINFO' ignored
FINFO is a defined structure in rtl.h as follows
typedef struct { S8 name[256]; U32 size; U16 fileID; U8 attrib; struct { U8 hr; U8 min; U8 sec; U8 day; U8 mon; U16 year; } time; } FINFO;
Obviously we are loathe to start changing any of the supplied RTX OS header files.
To simplify the problem we created a new empty project with just the include directive:
#include <rtl.h>
Error 129 in rtl.h is still reported by PC-Lint.
Does anyone know how to resolve this Lint error?
Thank you
John
I've resolved the problem.
Keil's CO-RV.LNT Lint configuration file does not cover the use of __swi functions.
The Lint error suggested the structure FINFO was the issue but PC-Lint reports no errors when the __swi definitions in rtl.h are commented out.
In order to get Lint to accept __swi declarations you need to add an additional rule to the lint configuration file. I call CO-RV.LNT from within another .LNT file and put the additional rule in my own .LNT file.
So, my file, called STD_ARM.LNT contains:
// Keil RealView compiler // Standard lint options CO-RV.LNT +d__swi=_to_brackets +rw(_to_brackets)
The _to_brackets option removes the associated error. PC-Lint returns no errors.
Just now I got the same error when I started linting my new Cortex-M3 project first time. I fixed it like above mentioned. - John, many thanks for your posting!