Skip to content

Commit 1137b41

Browse files
authored
Merge pull request #5489 from theotherjimmy/correct-pack-syntax
Correct pack_* members to refer to PACK files
2 parents 02beec7 + 0c5ba43 commit 1137b41

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/export/cmsis/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
from os.path import sep, join, exists
33
from itertools import groupby
44
from xml.etree.ElementTree import Element, tostring
5-
import ntpath
65
import re
76
import json
87

98
from tools.arm_pack_manager import Cache
109
from tools.targets import TARGET_MAP
1110
from tools.export.exporters import Exporter, TargetNotSupportedException
11+
from tools.utils import split_path
1212

1313
class fileCMSIS():
1414
"""CMSIS file class.
@@ -37,7 +37,8 @@ def __init__(self, target):
3737
if not target_info:
3838
raise TargetNotSupportedException("Target not supported in CMSIS pack")
3939
self.url = target_info['pdsc_file']
40-
self.pack_url, self.pack_id = ntpath.split(self.url)
40+
self.pdsc_url, self.pdsc_id, _ = split_path(self.url)
41+
self.pack_url, self.pack_id, _ = split_path(target_info['pack_file'])
4142
self.dname = target_info["_cpu_name"]
4243
self.core = target_info["_core"]
4344
self.dfpu = target_info['processor']['fpu']

0 commit comments

Comments
 (0)