Merge pull request #5489 from theotherjimmy/correct-pack-syntax

Correct pack_* members to refer to PACK files
pull/5693/head
Martin Kojtal 2017-12-12 17:32:31 +00:00 committed by GitHub
commit 1137b4107a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -2,13 +2,13 @@ import os
from os.path import sep, join, exists from os.path import sep, join, exists
from itertools import groupby from itertools import groupby
from xml.etree.ElementTree import Element, tostring from xml.etree.ElementTree import Element, tostring
import ntpath
import re import re
import json import json
from tools.arm_pack_manager import Cache from tools.arm_pack_manager import Cache
from tools.targets import TARGET_MAP from tools.targets import TARGET_MAP
from tools.export.exporters import Exporter, TargetNotSupportedException from tools.export.exporters import Exporter, TargetNotSupportedException
from tools.utils import split_path
class fileCMSIS(): class fileCMSIS():
"""CMSIS file class. """CMSIS file class.
@ -37,7 +37,8 @@ class DeviceCMSIS():
if not target_info: if not target_info:
raise TargetNotSupportedException("Target not supported in CMSIS pack") raise TargetNotSupportedException("Target not supported in CMSIS pack")
self.url = target_info['pdsc_file'] self.url = target_info['pdsc_file']
self.pack_url, self.pack_id = ntpath.split(self.url) self.pdsc_url, self.pdsc_id, _ = split_path(self.url)
self.pack_url, self.pack_id, _ = split_path(target_info['pack_file'])
self.dname = target_info["_cpu_name"] self.dname = target_info["_cpu_name"]
self.core = target_info["_core"] self.core = target_info["_core"]
self.dfpu = target_info['processor']['fpu'] self.dfpu = target_info['processor']['fpu']