Skip to content

Commit

Permalink
Invalid in some cases with IAR
Browse files Browse the repository at this point in the history
  • Loading branch information
tianxiaoMCU committed Jul 29, 2018
1 parent fac3594 commit 5650ba4
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions si4project_filelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,26 @@
if entry.is_file():
if entry.name.endswith('.eww'):
projectfilename = entry.name
depfilename = entry.name.replace('.eww', '.dep')
if os.path.exists(depfilename):
sourcefile = depfilename
outputfile = os.path.splitext(projectfilename)[0]

# find current target
wsdtfile = os.path.join(os.getcwd(), 'settings')
wsdtfile = os.path.join(wsdtfile, entry.name.replace('.eww', '.wsdt'))

if os.path.exists(wsdtfile):
tree = ET.ElementTree(file=wsdtfile)
ConfigDictionary = tree.find('ConfigDictionary')
CurrentConfigs = ConfigDictionary.find('CurrentConfigs')
TargetName = CurrentConfigs.find('Project').text.split('/')[1]
break
else:
print('Please build the project once')
input()
sys.exit(0)

# find current target
wsdtfile = os.path.join(os.getcwd(), 'settings')
wsdtfile = os.path.join(wsdtfile, entry.name.replace('.eww', '.wsdt'))

if os.path.exists(wsdtfile):
tree = ET.ElementTree(file=wsdtfile)
ConfigDictionary = tree.find('ConfigDictionary')
CurrentConfigs = ConfigDictionary.find('CurrentConfigs')
TargetName = CurrentConfigs.find('Project').text.split('/')[1]

depfilename = CurrentConfigs.find('Project').text.split('/')[0] + '.dep'
if os.path.exists(depfilename):
sourcefile = depfilename
outputfile = os.path.splitext(projectfilename)[0]
break

print('Please build the project once')
input()
sys.exit(0)

elif entry.name.endswith('.uvproj') or entry.name.endswith('.uvprojx'):
projectfilename = entry.name
Expand Down

0 comments on commit 5650ba4

Please sign in to comment.