Skip to content

RTL8195AM - Respect Toolchains paths in post bulid script. #5042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions tools/targets/REALTEK_RTL8195AM.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import shutil

from tools.paths import TOOLS_BOOTLOADERS
from tools.toolchains import TOOLCHAIN_PATHS
from datetime import datetime

# Constant Variables
Expand Down Expand Up @@ -122,7 +123,8 @@ def parse_load_segment_gcc(image_elf):
# LOAD 0x000034 0x10006000 0x10006000 0x026bc 0x026bc RW 0x8
# LOAD 0x0026f0 0x30000000 0x30000000 0x06338 0x06338 RWE 0x4
segment_list = []
cmd = 'arm-none-eabi-readelf -l ' + image_elf
cmd = os.path.join(TOOLCHAIN_PATHS['GCC_ARM'], 'arm-none-eabi-readelf')
cmd = '"' + cmd + '"' + ' -l ' + image_elf
for line in subprocess.check_output(cmd, shell=True, universal_newlines=True).split("\n"):
if not line.startswith(" LOAD"):
continue
Expand Down Expand Up @@ -153,7 +155,8 @@ def parse_load_segment_armcc(image_elf):
(offset, addr, size) = (0, 0, 0)
segment_list = []
in_segment = False
cmd = 'fromelf --text -v --only=none ' + image_elf
cmd = os.path.join(TOOLCHAIN_PATHS['ARM'], 'bin', 'fromelf')
cmd = '"' + cmd + '"' + ' --text -v --only=none ' + image_elf
for line in subprocess.check_output(cmd, shell=True, universal_newlines=True).split("\n"):
if line == "":
pass
Expand Down Expand Up @@ -201,7 +204,8 @@ def parse_load_segment_iar(image_elf):

segment_list = []
in_segment = False
cmd = 'ielfdumparm ' + image_elf
cmd = os.path.join(TOOLCHAIN_PATHS['IAR'], 'bin', 'ielfdumparm')
cmd = '"' + cmd + '"' + ' ' + image_elf
for line in subprocess.check_output(cmd, shell=True, universal_newlines=True).split("\n"):
if line.startswith(" SEGMENTS:"):
in_segment = True
Expand Down