mirror of https://github.com/RT-Thread/rt-thread
parent
f00b0a4384
commit
53fcd9d085
|
@ -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':
|
||||
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
@ -86,7 +86,7 @@ def IARProject(target, script):
|
|||
out = open(target, 'w')
|
||||
|
||||
CPPPATH = []
|
||||
CPPDEFINES = []
|
||||
CPPDEFINES = env.get('CPPDEFINES', [])
|
||||
LOCAL_CPPDEFINES = []
|
||||
LINKFLAGS = ''
|
||||
CFLAGS = ''
|
||||
|
@ -112,9 +112,6 @@ def IARProject(target, script):
|
|||
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']
|
||||
|
|
Loading…
Reference in New Issue