|
9 | 9 | import shutil
|
10 | 10 |
|
11 | 11 | from tools.paths import TOOLS_BOOTLOADERS
|
| 12 | +from tools.toolchains import TOOLCHAIN_PATHS |
12 | 13 | from datetime import datetime
|
13 | 14 |
|
14 | 15 | # Constant Variables
|
@@ -122,7 +123,8 @@ def parse_load_segment_gcc(image_elf):
|
122 | 123 | # LOAD 0x000034 0x10006000 0x10006000 0x026bc 0x026bc RW 0x8
|
123 | 124 | # LOAD 0x0026f0 0x30000000 0x30000000 0x06338 0x06338 RWE 0x4
|
124 | 125 | segment_list = []
|
125 |
| - cmd = 'arm-none-eabi-readelf -l ' + image_elf |
| 126 | + cmd = os.path.join(TOOLCHAIN_PATHS['GCC_ARM'], 'arm-none-eabi-readelf') |
| 127 | + cmd = '"' + cmd + '"' + ' -l ' + image_elf |
126 | 128 | for line in subprocess.check_output(cmd, shell=True, universal_newlines=True).split("\n"):
|
127 | 129 | if not line.startswith(" LOAD"):
|
128 | 130 | continue
|
@@ -153,7 +155,8 @@ def parse_load_segment_armcc(image_elf):
|
153 | 155 | (offset, addr, size) = (0, 0, 0)
|
154 | 156 | segment_list = []
|
155 | 157 | in_segment = False
|
156 |
| - cmd = 'fromelf --text -v --only=none ' + image_elf |
| 158 | + cmd = os.path.join(TOOLCHAIN_PATHS['ARM'], 'bin', 'fromelf') |
| 159 | + cmd = '"' + cmd + '"' + ' --text -v --only=none ' + image_elf |
157 | 160 | for line in subprocess.check_output(cmd, shell=True, universal_newlines=True).split("\n"):
|
158 | 161 | if line == "":
|
159 | 162 | pass
|
@@ -201,7 +204,8 @@ def parse_load_segment_iar(image_elf):
|
201 | 204 |
|
202 | 205 | segment_list = []
|
203 | 206 | in_segment = False
|
204 |
| - cmd = 'ielfdumparm ' + image_elf |
| 207 | + cmd = os.path.join(TOOLCHAIN_PATHS['IAR'], 'bin', 'ielfdumparm') |
| 208 | + cmd = '"' + cmd + '"' + ' ' + image_elf |
205 | 209 | for line in subprocess.check_output(cmd, shell=True, universal_newlines=True).split("\n"):
|
206 | 210 | if line.startswith(" SEGMENTS:"):
|
207 | 211 | in_segment = True
|
|
0 commit comments