Search in sources :

Example 6 with TexasInstrumentsMemoryMapParser

use of net.praqma.jenkins.memorymap.parser.ti.TexasInstrumentsMemoryMapParser in project memory-map-plugin by Praqma.

the class MemoryMapJobDslContext method parser.

public void parser(String parserType, String parserUniqueName, String commandFile, String mapFile, Runnable closure) {
    checkArgument(parserTypes.contains(parserType), "Parser type must be one of " + parserTypes);
    MemoryMapParserDslContext context = new MemoryMapParserDslContext();
    executeInContext(closure, context);
    AbstractMemoryMapParser parser = null;
    switch(parserType) {
        case "GCC":
            parser = new GccMemoryMapParser(parserUniqueName, mapFile, commandFile, wordSize, showBytesOnGraphs, context.graphConfigurations);
            break;
        case "TI":
            parser = new TexasInstrumentsMemoryMapParser(parserUniqueName, mapFile, commandFile, wordSize, context.graphConfigurations, showBytesOnGraphs);
            break;
        default:
            System.out.println("Unable to allocate parser: " + parserType);
            break;
    }
    if (parser != null) {
        parser.setParserTitle(context.parserTitle);
        parsers.add(parser);
    }
}
Also used : TexasInstrumentsMemoryMapParser(net.praqma.jenkins.memorymap.parser.ti.TexasInstrumentsMemoryMapParser) AbstractMemoryMapParser(net.praqma.jenkins.memorymap.parser.AbstractMemoryMapParser) GccMemoryMapParser(net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser)

Aggregations

TexasInstrumentsMemoryMapParser (net.praqma.jenkins.memorymap.parser.ti.TexasInstrumentsMemoryMapParser)6 Test (org.junit.Test)5 File (java.io.File)3 IOException (java.io.IOException)2 MemoryMapGraphConfiguration (net.praqma.jenkins.memorymap.graph.MemoryMapGraphConfiguration)2 AbstractMemoryMapParser (net.praqma.jenkins.memorymap.parser.AbstractMemoryMapParser)2 HashMap (java.util.HashMap)1 MemoryMapMapParserDelegate (net.praqma.jenkins.memorymap.parser.MemoryMapMapParserDelegate)1 GccMemoryMapParser (net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser)1 MemoryMapConfigMemory (net.praqma.jenkins.memorymap.result.MemoryMapConfigMemory)1 MemoryMapConfigMemoryItem (net.praqma.jenkins.memorymap.result.MemoryMapConfigMemoryItem)1 Assert (org.junit.Assert)1