OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [posix/] [test0/] [tools/] [generate_bootdesc.py] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
#!/usr/bin/python
2
import os
3
import sys
4
 
5
compiler_prefix = "arm-linux-"
6
objdump = "objdump"
7
command = "-t"
8
image_name = "roottask.axf"
9
linkoutput_file_suffix = "-linkinfo.txt"
10
linkoutput_file = image_name + linkoutput_file_suffix
11
def generate_bootdesc():
12
        command = compiler_prefix + objdump + " -t " + image_name + " > " + linkoutput_file
13
        print command
14
        os.system(command)
15
        f = open(linkoutput_file, "r")
16
 
17
        while True:
18
                line = f.readline()
19
                if len(line) is 0:
20
                        break
21
                if "_start" in line or "_end" in line:
22
                        print line
23
        f.close()
24
 
25
if __name__ == "__main__":
26
        generate_bootdesc()
27
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.