Skip to content
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
4 changes: 2 additions & 2 deletions tools/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ def GenTargetProject(program = None):
if GetOption('target') == 'iar':
from targets.iar import IARProject, IARVersion
print("IAR Version: " + IARVersion())
IARProject(GetOption('project-name') + '.ewp', Projects)
IARProject(Env, GetOption('project-name') + '.ewp', Projects)
print("IAR project has generated successfully!")

if GetOption('target') == 'vs':
Expand Down Expand Up @@ -934,7 +934,7 @@ def EndBuilding(target, program = None):
if not isinstance(project_path, str) or len(project_path) == 0:
project_path = os.path.join(BSP_ROOT, 'rt-studio-project')
MkDist(program, BSP_ROOT, Rtt_Root, Env, project_name, project_path)
child = subprocess.Popen('scons --target=eclipse --project-name="{}"'.format(project_name),
child = subprocess.Popen('scons --target=eclipse --project-name="{}"'.format(project_name),
cwd=project_path, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
stdout, stderr = child.communicate()
need_exit = True
Expand Down
7 changes: 2 additions & 5 deletions tools/targets/iar.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def IARWorkspace(target):
out.write(xml)
out.close()

def IARProject(target, script):
def IARProject(env, target, script):
project_path = os.path.dirname(os.path.abspath(target))

tree = etree.parse('template.ewp')
Expand All @@ -86,7 +86,7 @@ def IARProject(target, script):
out = open(target, 'w')

CPPPATH = []
CPPDEFINES = []
CPPDEFINES = env.get('CPPDEFINES', [])
LOCAL_CPPDEFINES = []
LINKFLAGS = ''
CFLAGS = ''
Expand All @@ -112,9 +112,6 @@ def searchLib(group):
if 'CPPPATH' in group and group['CPPPATH']:
CPPPATH += group['CPPPATH']

# get each group's definitions
if 'CPPDEFINES' in group and group['CPPDEFINES']:
CPPDEFINES += group['CPPDEFINES']

if 'LOCAL_CPPDEFINES' in group and group['LOCAL_CPPDEFINES']:
LOCAL_CPPDEFINES += group['LOCAL_CPPDEFINES']
Expand Down