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.

TMS470 Code Generation Tools 4.9.0B1 incorrect MISRA 19.15 warning

Hi,

We have been evaluating the 4.9.0B1 compiler and whilst many of the MISRA issues we have reported have been fixed, it appears that a new one has appeared.

All our header files start with a macro as described in the MISRA standard. For example in a file called can.h, the start of the file would appear as:

#ifndef _CAN_H_

#define _CAN_H_

/* Copyright message etc. */

/* Definitions */

#endif /* _CAN_H_ */

We are getting MISRA 19.15 on the first line and on the penultimate (#endif) line of the header file.

Regards,

Richard

  • I cannot reproduce this MISRA diagnostic.  Please submit a test case as described in the last part of the forum welcome message.

    Thanks and regards,

    -George

  • Hi George,

    I cannot reproduce wth a simple project so I have sent you a private message with a subset of our project that exhibits the problem.

    Regards,

    Richard 

  • Thanks for sending in that test case.  I can reproduce the error in a smaller setting that uses a few of the header files from your test case.  I filed SDSCM00039236 in our SDOWP system.  You can track it with the SDOWP link below in my sig.

    Thanks and regards,

    -George

  • Hi,

    I'm having the same problem right now with MISRA rule 19.15 in almost all header file from TI.

    Can you please tell me, what the problem was related to in this thread, cause I don't know where to look at the moment.

    I went through all my header files and checked the #ifndef #define -> #endif tags and they all seem to be correct.

    My code doesn't have anything to do with a code generator by the way.

    I'm using CCS  5.1.0.09000 and I'm programming the F28035

    Kind Regards,

    Heiny

  • Hi Heiny,

    This appears to be a compiler issue. Our solution was to turn off the MISRA warning for MISRA 19.15. Whilst this fixes the warning messages it does not resolve the problem. The SDOWP database is still showing this issue as Accepted so it looks like it isn't fixed yet.

    Regards,

    Richard

  • Hi Richard,

    Thanks for the quick reply.

    I worked around it, but not by disabling the MISRA rule, but the problem seems to appear only in Header files which are included in other Header files.

    So what I did, is remove the includes from DSP2803x_Examples.h and DSP2803x_Device.h. After that I added the prototypes to the right module-header files and removed the externals from DSP2803x_GlobalPrototypes.h and now it works.

    Kind Regards,

    Heiny

  • we are having April 2014 and i can confirm the problem still exists as ever.

    can we get that issue fixed at any point in time?

  • Hi Alexander,

    Out of interest I checked the SDOWP database that is referenced in one of the earlier posts in this thread and this issue is reported fixed in 4.9.1. I haven't checked myself that it is in fact fixed in this or other compiler branches (we are now using an external tool for MISRA checking). It may be that the problem still exists in other compiler branches.

    Regards,
    Richard

  • I think two things are happening at once.  One, we messed up the bookkeeping on this bug such that it appears to be fixed only on the 4.9.x release stream, when in fact it is fixed in the later release streams as well.  Two ...

    Alexander Stohr said:
    we are having April 2014 and i can confirm the problem still exists as ever.

    I suspect this is a new bug we have not seen before.  It appears the same because it also causes MISRA 19.15 to be emitted.  We cannot reproduce this behavior.  I'd appreciate if you would send in a test case that allows us to see it.

    Thanks and regards,

    -George