diff --git a/tools/export/cmsis/__init__.py b/tools/export/cmsis/__init__.py index 2bf62ff267f..b036d674aa2 100644 --- a/tools/export/cmsis/__init__.py +++ b/tools/export/cmsis/__init__.py @@ -2,13 +2,13 @@ from os.path import sep, join, exists from itertools import groupby from xml.etree.ElementTree import Element, tostring -import ntpath import re import json from tools.arm_pack_manager import Cache from tools.targets import TARGET_MAP from tools.export.exporters import Exporter, TargetNotSupportedException +from tools.utils import split_path class fileCMSIS(): """CMSIS file class. @@ -37,7 +37,8 @@ def __init__(self, target): if not target_info: raise TargetNotSupportedException("Target not supported in CMSIS pack") 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.core = target_info["_core"] self.dfpu = target_info['processor']['fpu']