Skip to content

Commit e9e0595

Browse files
authored
Merge pull request #5042 from tung7970/fix-tools
RTL8195AM - Respect Toolchains paths in post bulid script.
2 parents cbb8a1f + 7d6e66d commit e9e0595

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tools/targets/REALTEK_RTL8195AM.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import shutil
1010

1111
from tools.paths import TOOLS_BOOTLOADERS
12+
from tools.toolchains import TOOLCHAIN_PATHS
1213
from datetime import datetime
1314

1415
# Constant Variables
@@ -122,7 +123,8 @@ def parse_load_segment_gcc(image_elf):
122123
# LOAD 0x000034 0x10006000 0x10006000 0x026bc 0x026bc RW 0x8
123124
# LOAD 0x0026f0 0x30000000 0x30000000 0x06338 0x06338 RWE 0x4
124125
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
126128
for line in subprocess.check_output(cmd, shell=True, universal_newlines=True).split("\n"):
127129
if not line.startswith(" LOAD"):
128130
continue
@@ -153,7 +155,8 @@ def parse_load_segment_armcc(image_elf):
153155
(offset, addr, size) = (0, 0, 0)
154156
segment_list = []
155157
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
157160
for line in subprocess.check_output(cmd, shell=True, universal_newlines=True).split("\n"):
158161
if line == "":
159162
pass
@@ -201,7 +204,8 @@ def parse_load_segment_iar(image_elf):
201204

202205
segment_list = []
203206
in_segment = False
204-
cmd = 'ielfdumparm ' + image_elf
207+
cmd = os.path.join(TOOLCHAIN_PATHS['IAR'], 'bin', 'ielfdumparm')
208+
cmd = '"' + cmd + '"' + ' ' + image_elf
205209
for line in subprocess.check_output(cmd, shell=True, universal_newlines=True).split("\n"):
206210
if line.startswith(" SEGMENTS:"):
207211
in_segment = True

0 commit comments

Comments
 (0)