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

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [posix/] [mm0/] [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
from configure import *
6
config = configuration_retrieve()
7
 
8
objdump = "objdump"
9
command = "-t"
10
image_name = "inittask.axf"
11
linkoutput_file_suffix = "-linkinfo.txt"
12
linkoutput_file = image_name + linkoutput_file_suffix
13
 
14
def generate_bootdesc():
15
        command = config.toolchain_userspace + objdump + \
16
                  " -t " + image_name + " > " + linkoutput_file
17
        print command
18
        os.system(command)
19
        f = open(linkoutput_file, "r")
20
 
21
        while True:
22
                line = f.readline()
23
                if len(line) is 0:
24
                        break
25
                if "_start" in line or "_end" in line:
26
                        print line
27
        f.close()
28
 
29
if __name__ == "__main__":
30
        generate_bootdesc()
31
 

powered by: WebSVN 2.1.0

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