Skip to content

Commit 01475cf

Browse files
theotherjimmyadbridge
authored andcommitted
Test GCC memap parser
1 parent 2b8f993 commit 01475cf

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

tools/test/memap/gcc.map

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Archive member included to satisfy reference by file (symbol)
2+
3+
Linker script and memory map
4+
.text 0x000000000001b000 0x11a30
5+
.Vectors 0x000000000001b000 0x98 /common/path/irqs/irqs.o
6+
0x000000000001b168 0x36 /common/path/main.o
7+
0x000000000001b168 count5(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)
8+
0x000000000001b200 0xc0 /common/path/startup/startup.o
9+
0x000000000001b200 startup()
10+
0x0000000000024020 0x8 /usr/lib/gcc/arm-none-eabi/7.1.0/../../../../arm-none-eabi/lib/armv6-m/libd16M_tlf.a(__main.o)
11+
12+
.data 0x0000000020002ef8 0xac8 load address 0x000000000002ca38
13+
0x0000000020002ef8 __data_start__ = .
14+
*(vtable)
15+
*(.data*)
16+
0x0000000020002ef8 0x18 /common/path/data/data.o
17+
0x0000000020002ef8 some_global_var
18+
19+
.bss 0x0000000020003a80 0x2050 load address 0x000000000002d5c0
20+
0x0000000020003a80 . = ALIGN (0x4)
21+
0x0000000020003a80 __bss_start__ = .
22+
*(.bss*)
23+
.bss.completed.8574
24+
.bss.counter 0x0000000020003c08 0x198 /common/path/data.o
25+
0x0000000020003c08 some_zero_init_var

tools/test/memap/parse_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,8 @@ def test_parse_iar():
3434
memap = MemapParser()
3535
memap.parse_map_file_iar(open(join(dirname(__file__), "iar.map")))
3636
assert memap.modules == PARSED_IAR_GCC_DATA
37+
38+
def test_parse_gcc():
39+
memap = MemapParser()
40+
memap.parse_map_file_gcc(open(join(dirname(__file__), "gcc.map")))
41+
assert memap.modules == PARSED_IAR_GCC_DATA

0 commit comments

Comments
 (0)