mirror of https://github.com/ARMmbed/mbed-os.git
Correct uvisionn export
parent
dbbf336949
commit
9de37ec39c
|
@ -36,16 +36,21 @@ class DeviceCMSIS():
|
|||
target_info = self.check_supported(target)
|
||||
if not target_info:
|
||||
raise TargetNotSupportedException("Target not supported in CMSIS pack")
|
||||
self.url = target_info['pdsc_file']
|
||||
self.pdsc_url, self.pdsc_id, _ = split_path(self.url)
|
||||
self.pack_url, self.pack_id, _ = split_path(target_info['pack_file'])
|
||||
self.pack_url = target_info['from_pack']['url']
|
||||
self.pack_id = "{}.{}.{}".format(
|
||||
target_info['from_pack']['vendor'],
|
||||
target_info['from_pack']['pack'],
|
||||
target_info['from_pack']['version']
|
||||
)
|
||||
self.dname = target_info["_cpu_name"]
|
||||
self.core = target_info["_core"]
|
||||
self.dfpu = target_info['processor']['fpu']
|
||||
self.debug, self.dvendor = self.vendor_debug(target_info['vendor'])
|
||||
try:
|
||||
self.dfpu = target_info['processor']['Symmetric']['fpu']
|
||||
except KeyError:
|
||||
self.dfpu = target_info['processor']['Asymmetric']['fpu']
|
||||
self.debug, self.dvendor = self.vendor_debug(target_info['from_pack']['vendor'])
|
||||
self.dendian = target_info['processor'].get('endianness','Little-endian')
|
||||
self.debug_svd = target_info.get('debug', '')
|
||||
self.compile_header = target_info['compile']['header']
|
||||
self.target_info = target_info
|
||||
|
||||
@staticmethod
|
||||
|
|
|
@ -26,7 +26,6 @@ class DeviceUvision(DeviceCMSIS):
|
|||
self.svd = ''
|
||||
if self.debug_svd:
|
||||
self.svd = dev_format.format(self.dname, self.debug_svd)
|
||||
self.reg_file = dev_format.format(self.dname, self.compile_header)
|
||||
self.debug_interface = self.uv_debug()
|
||||
self.flash_dll = self.generate_flash_dll()
|
||||
|
||||
|
@ -73,14 +72,10 @@ class DeviceUvision(DeviceCMSIS):
|
|||
'''
|
||||
fl_count = 0
|
||||
|
||||
def get_mem_no_x(mem_str):
|
||||
mem_reg = "\dx(\w+)"
|
||||
m = re.search(mem_reg, mem_str)
|
||||
return m.group(1) if m else None
|
||||
|
||||
RAMS = [
|
||||
(get_mem_no_x(info["start"]), get_mem_no_x(info["size"]))
|
||||
for mem, info in self.target_info["memory"].items() if "RAM" in mem
|
||||
(info["start"], info["size"])
|
||||
for mem, info in self.target_info["memories"].items()
|
||||
if "RAM" in mem
|
||||
]
|
||||
format_str = (
|
||||
"UL2CM3(-S0 -C0 -P0 -FD{ramstart}"
|
||||
|
@ -92,24 +87,25 @@ class DeviceUvision(DeviceCMSIS):
|
|||
if len(RAMS) >= 1:
|
||||
ramstart = RAMS[0][0]
|
||||
extra_flags = []
|
||||
for name, info in self.target_info["algorithm"].items():
|
||||
if not name or not info:
|
||||
for info in self.target_info["algorithms"]:
|
||||
if not info:
|
||||
continue
|
||||
if int(info["default"]) == 0:
|
||||
if not info["default"]:
|
||||
continue
|
||||
name = info['file_name']
|
||||
name_reg = "\w*/([\w_]+)\.flm"
|
||||
m = re.search(name_reg, name.lower())
|
||||
fl_name = m.group(1) if m else None
|
||||
name_flag = "-FF" + str(fl_count) + fl_name
|
||||
|
||||
start = get_mem_no_x(info["start"])
|
||||
size = get_mem_no_x(info["size"])
|
||||
start = '{:x}'.format(info["start"])
|
||||
size = '{:x}'.format(info["size"])
|
||||
rom_start_flag = "-FS" + str(fl_count) + str(start)
|
||||
rom_size_flag = "-FL" + str(fl_count) + str(size)
|
||||
|
||||
if info["ramstart"] is not None and info["ramsize"] is not None:
|
||||
ramstart = get_mem_no_x(info["ramstart"])
|
||||
ramsize = get_mem_no_x(info["ramsize"])
|
||||
ramstart = '{:x}'.format(info["ramstart"])
|
||||
ramsize = '{:x}'.format(info["ramsize"])
|
||||
|
||||
path_flag = "-FP{}($$Device:{}${})".format(
|
||||
str(fl_count), self.dname, name
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>{{device.flash_dll}}</FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>{{device.reg_file}}</RegisterFile>
|
||||
<RegisterFile></RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
<Cmp></Cmp>
|
||||
<Asm></Asm>
|
||||
|
|
Loading…
Reference in New Issue