Search in sources :

Example 6 with GccMemoryMapParser

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

the class MemoryMapGccParserTest method testParsingOfMemorySegmentInLinkerCommandFile.

@Test
public void testParsingOfMemorySegmentInLinkerCommandFile() throws IOException {
    GccMemoryMapParser parser = new GccMemoryMapParser();
    String fileNameLinker = MemoryMapGccParserTest.class.getResource("prom.ld").getFile();
    String fileNameMap = MemoryMapGccParserTest.class.getResource("prom.map").getFile();
    assertNotNull(fileNameLinker);
    assertNotNull(fileNameMap);
    File f = new File(fileNameLinker);
    MemoryMapConfigMemory mem = parser.parseConfigFile(f);
    File f2 = new File(fileNameMap);
    parser.parseMapFile(f2, mem);
}
Also used : MemoryMapConfigMemory(net.praqma.jenkins.memorymap.result.MemoryMapConfigMemory) GccMemoryMapParser(net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser) File(java.io.File) Test(org.junit.Test)

Example 7 with GccMemoryMapParser

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

the class GccMemoryMapParserIT method gcc484_testUsageValues.

@Test
public void gcc484_testUsageValues() throws Exception {
    MemoryMapGraphConfiguration graphConfiguration = new MemoryMapGraphConfiguration("rom", "484");
    GccMemoryMapParser parser = createParser(graphConfiguration);
    parser.setMapFile("map.map");
    parser.setConfigurationFile("link.ld");
    HashMap<String, String> expectedValues = new HashMap<>();
    expectedValues.put("rom", "0x01000000");
    expectedValues.put("ram", "0x04000000");
    expectedValues.put(".data", "0x00000000");
    expectedValues.put(".bss", "0x00000000");
    expectedValues.put(".text", "0x0000013c");
    TestUtils.testUsageValues(jenkins, parser, "gcc484.zip", expectedValues);
}
Also used : MemoryMapGraphConfiguration(net.praqma.jenkins.memorymap.graph.MemoryMapGraphConfiguration) HashMap(java.util.HashMap) GccMemoryMapParser(net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser) Test(org.junit.Test)

Aggregations

GccMemoryMapParser (net.praqma.jenkins.memorymap.parser.gcc.GccMemoryMapParser)7 Test (org.junit.Test)6 HashMap (java.util.HashMap)3 MemoryMapGraphConfiguration (net.praqma.jenkins.memorymap.graph.MemoryMapGraphConfiguration)3 FreeStyleBuild (hudson.model.FreeStyleBuild)1 FreeStyleProject (hudson.model.FreeStyleProject)1 File (java.io.File)1 AbstractMemoryMapParser (net.praqma.jenkins.memorymap.parser.AbstractMemoryMapParser)1 TexasInstrumentsMemoryMapParser (net.praqma.jenkins.memorymap.parser.ti.TexasInstrumentsMemoryMapParser)1 MemoryMapConfigMemory (net.praqma.jenkins.memorymap.result.MemoryMapConfigMemory)1