Forum Discussion

JOSC's avatar
JOSC
Icon for New Contributor rankNew Contributor
3 years ago

nios ii dynamic code analysis

Dear fellow nios ii developers,

due to a functional-safety-related project, we are required to use dynamic code analysis in the development of the safety-related software (C-code). So far, i have come accross the LDRA tool which seems to offer a good native support of the nios ii softcores (as far as someone can judge from a website ...) . Does anybody have any experience with this tool? I am also very open to alternative suggestions.

Best regards,

JOSC

3 Replies

  • JOSC's avatar
    JOSC
    Icon for New Contributor rankNew Contributor

    Hi Sheng,

    thanks for the suggestion. LDRA offers a trial version, so we should be able to evaluate this tool with the nios 2 eds. Lets see how this plays out.

    Still, it would be interesting what tools generally could be used for this job. Interestingly, the gcc compiler offers the ability to profile code-coverage (i think by using the -fprofile-arcs -ftest-coverage flags) together with the gcov tool. This tool is also included in the nios2-eds (nios2-elf-gcov and nios2-elf-gcov-tool). As the necessary .gcda files are created on the target system (i.e. the embedded nios 2 system), this approach does not work out-of-the-box. Is there some way those files can be stored in some kind of embedded file-system (maybe on the connected EPCQ-flash), and then be transferred after the program is run on the target system?

    Best regards,

    JOSC

  • ShengN_altera's avatar
    ShengN_altera
    Icon for Super Contributor rankSuper Contributor

    Hi JOSC,


    I search for some LDRA Tool alternatives but seems like only LDRA supported Intel Nios II Embedded the best.

    After going through this manual https://gcc.gnu.org/onlinedocs/gcc-11.2.0/gcc.pdf, I don't see there is any way to store those .gcda data files in the embedded file-system you mentioned above.

    Hopefully answering your questions.


    Thanks,

    Best regards,

    Sheng