|
4 | 4 | from __future__ import print_function, division, absolute_import
|
5 | 5 |
|
6 | 6 | from abc import abstractmethod, ABCMeta
|
7 |
| -from sys import stdout, exit, argv |
| 7 | +from sys import stdout, exit, argv, path |
8 | 8 | from os import sep, rename, remove
|
9 | 9 | from os.path import (basename, dirname, join, relpath, abspath, commonprefix,
|
10 | 10 | splitext, exists)
|
| 11 | + |
| 12 | +# Be sure that the tools directory is in the search path |
| 13 | +ROOT = abspath(join(dirname(__file__), "..")) |
| 14 | +path.insert(0, ROOT) |
| 15 | + |
11 | 16 | import re
|
12 | 17 | import csv
|
13 | 18 | import json
|
|
18 | 23 | from jinja2 import FileSystemLoader, StrictUndefined
|
19 | 24 | from jinja2.environment import Environment
|
20 | 25 |
|
21 |
| -from .utils import (argparse_filestring_type, argparse_lowercase_hyphen_type, |
22 |
| - argparse_uppercase_type) |
23 |
| -from .settings import COMPARE_FIXED |
| 26 | +from tools.utils import (argparse_filestring_type, argparse_lowercase_hyphen_type, |
| 27 | + argparse_uppercase_type) |
| 28 | +from tools.settings import COMPARE_FIXED |
24 | 29 |
|
25 | 30 |
|
26 | 31 | class _Parser(object):
|
@@ -93,7 +98,7 @@ class _GccParser(_Parser):
|
93 | 98 | _Parser.MISC_FLASH_SECTIONS + ('unknown', 'OUTPUT')
|
94 | 99 |
|
95 | 100 | def check_new_section(self, line):
|
96 |
| - """ Check whether a new section in a map file has been detected |
| 101 | + """ Check whether a new section in a map file has been detected |
97 | 102 |
|
98 | 103 | Positional arguments:
|
99 | 104 | line - the line to check for a new section
|
@@ -790,7 +795,7 @@ def compute_report(self):
|
790 | 795 | self.mem_report.append({
|
791 | 796 | "module": name,
|
792 | 797 | "size":{
|
793 |
| - k: sizes.get(k, 0) for k in (self.print_sections + |
| 798 | + k: sizes.get(k, 0) for k in (self.print_sections + |
794 | 799 | self.delta_sections)
|
795 | 800 | }
|
796 | 801 | })
|
|
0 commit comments