Skip to content

Export - define ProGenDef outside of the loop #2202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tools/export/iar.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ class IAREmbeddedWorkbench(Exporter):
def TARGETS(cls):
if not hasattr(cls, "_targets_supported"):
cls._targets_supported = []
progendef = ProGenDef('iar')
for target in TARGET_NAMES:
try:
if (ProGenDef('iar').is_supported(str(TARGET_MAP[target])) or
ProGenDef('iar').is_supported(TARGET_MAP[target].progen['target'])):
if (progendef.is_supported(str(TARGET_MAP[target])) or
progendef.is_supported(TARGET_MAP[target].progen['target'])):
cls._targets_supported.append(target)
except AttributeError:
# target is not supported yet
Expand Down
5 changes: 3 additions & 2 deletions tools/export/uvision4.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ class Uvision4(Exporter):
def TARGETS(cls):
if not hasattr(cls, "_targets_supported"):
cls._targets_supported = []
progendef = ProGenDef('uvision')
for target in TARGET_NAMES:
try:
if (ProGenDef('uvision').is_supported(str(TARGET_MAP[target])) or
ProGenDef('uvision').is_supported(TARGET_MAP[target].progen['target'])):
if (progendef.is_supported(str(TARGET_MAP[target])) or
progendef.is_supported(TARGET_MAP[target].progen['target'])):
cls._targets_supported.append(target)
except AttributeError:
# target is not supported yet
Expand Down
5 changes: 3 additions & 2 deletions tools/export/uvision5.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ class Uvision5(Exporter):
def TARGETS(cls):
if not hasattr(cls, "_targets_supported"):
cls._targets_supported = []
progendef = ProGenDef('uvision5')
for target in TARGET_NAMES:
try:
if (ProGenDef('uvision5').is_supported(str(TARGET_MAP[target])) or
ProGenDef('uvision5').is_supported(TARGET_MAP[target].progen['target'])):
if (progendef.is_supported(str(TARGET_MAP[target])) or
progendef.is_supported(TARGET_MAP[target].progen['target'])):
cls._targets_supported.append(target)
except AttributeError:
# target is not supported yet
Expand Down