Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Code Coverage

Altera_Forum
Honored Contributor II
1,373 Views

Does anyone know if there is a code coverage tool for the NIOS2? What I am talking about is a tool that connects to the hardware and traces each if, while, for, switch, etc. It dumps a report/analysis that lets you know where your dead code is. It sounds complicated, but in all actuality it takes your source code, inserts a data bus write (tag) at each conditional statement, and then recompiles it. Yes it does increase the app size and slows you down a bit, but it does what it's supposed to do - code coverage. All you need is to supply a nWE and 32 bits of data. When you run your code, it collects the data tags and writes a report for you. It's kind of like a device specific logic analyzer. We use Metrowerks Codetest, but they don't have NIOS2 support at this time. Just wondering if anyone else has something similar.

0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
454 Views

You might check out the Lauterbach tools, which now support Nios II: http://www.lauterbach.com (http://www.lauterbach.com) I have heard that they have this capability, although I haven't used it myself.

0 Kudos
Reply