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.

File, Function and Line coverage in TM4C129 device



Dear All,

Is it possible for File, Function and Line coverage in TM4C129 device? If yes i need the steps to enable this options. My compiler version is CCS6.1.1 and TI_RTOS 2.14.

Regards,

M Srinivas

  • What are you referring to?

    This sounds like test coverage but that's not specific to the device (or even really to the compiler).

    Maybe profiling, although that's typically a debugger/RTOS function. There are also methods to approach that without using a debugger, if your code is well structured.

    Robert
  • Hello Srinivas,

    Can you provide more details on what you're trying to accomplish? Are you talking about SW validation/test? If so, CCS is a very capable IDE but does not include test coverage or specific test functionality other than what you would implement and track independently.

    There are several third party tools on the market that also support such a test environment such as LDRA tools which will enable you to develop a set of tests that are regressible and also provide code coverage metrics.

    Also, CCS6.1.1 is the IDE version. The compiler is a component within the IDE and is versioned differently. You can find the specific versioning of all components by clicking Help--> About Code Composer Studio --> Installation Details.
  • Dear All,

    Compiler version is 5.2.5. I want to know coverage's like how many times a function is called, how many instructions executed (line coverage) etc., It is just like SW validation.

    Regards,

    M Srinivas
  • Hello Chuck Davenport,

    I want to have SW validation like how many times a function is called, number of instructions in the code etc., Compiler version is TI5.2.5

    Regards,
    M Srinivas
  • I do believe Chuck has answered that the TI compiler/debugger is not capable of that.

    You can look at additional tools but I'd also suggest looking at TDD (test Driven Development). Those tools are largely entirely independent of the target and, I think, more productive.

    Robert
  • Let this writing strongly support (and Like) poster Robert's "TDD" suggestion.

    Your investigation - via forum search - should reveal the book, "Test Drive Development for Embedded C" by J. Grenning.   Both Robert & I found this book highly effective - in (both) the introduction and implementation - of these powerful & effective methods...

  • Srinivas,

    As mentioned, CCS doesn't necessarily support all needed V&V functionality since it is not really designed for that. It is designed for debug of an application for development.
    It could however be used for perhaps bench level testing based on a carefully thought out and planned validation process. If you were to use it in a validation process, it does not necessarily provide metrics; but, it could be used to set breakpoints and see paths through the code based on manually changed input variables via watch windows or expression watches. You could, for example, satisfy your function use count metric, use a watch point to count how many times the watch point is reached. Much of this might require instrumenting your code or even developing a wrapper to place functions within to achieve SUIT level testing. The script capability could also be used to automate such a test scheme provided you had the resources and understanding to develop the script.

    In the end, though, I would recommend you look at a third party or home grown tool to do the testing. CCS will be a part of this since it is your access to the device and operating code. Generally speaking I recall that the accepted standard for Validation and Verification is that you will need to write 10 lines of test code for every 1 line of source code you are testing.