mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-07 01:44:41 +08:00
[tools]:修复iar添加宏不完全 (#10507)
Some checks failed
ToolsCI / Tools (push) Has been cancelled
AutoTestCI / components/cpp11 (push) Has been cancelled
AutoTestCI / kernel/atomic (push) Has been cancelled
AutoTestCI / kernel/atomic/riscv64 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11/riscv64 (push) Has been cancelled
AutoTestCI / kernel/device (push) Has been cancelled
AutoTestCI / kernel/ipc (push) Has been cancelled
AutoTestCI / kernel/irq (push) Has been cancelled
AutoTestCI / kernel/mem (push) Has been cancelled
AutoTestCI / kernel/mem/riscv64 (push) Has been cancelled
AutoTestCI / kernel/thread (push) Has been cancelled
AutoTestCI / kernel/timer (push) Has been cancelled
AutoTestCI / rtsmart/aarch64 (push) Has been cancelled
AutoTestCI / rtsmart/arm (push) Has been cancelled
AutoTestCI / rtsmart/riscv64 (push) Has been cancelled
AutoTestCI / components/utest (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
Some checks failed
ToolsCI / Tools (push) Has been cancelled
AutoTestCI / components/cpp11 (push) Has been cancelled
AutoTestCI / kernel/atomic (push) Has been cancelled
AutoTestCI / kernel/atomic/riscv64 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11 (push) Has been cancelled
AutoTestCI / kernel/atomic_c11/riscv64 (push) Has been cancelled
AutoTestCI / kernel/device (push) Has been cancelled
AutoTestCI / kernel/ipc (push) Has been cancelled
AutoTestCI / kernel/irq (push) Has been cancelled
AutoTestCI / kernel/mem (push) Has been cancelled
AutoTestCI / kernel/mem/riscv64 (push) Has been cancelled
AutoTestCI / kernel/thread (push) Has been cancelled
AutoTestCI / kernel/timer (push) Has been cancelled
AutoTestCI / rtsmart/aarch64 (push) Has been cancelled
AutoTestCI / rtsmart/arm (push) Has been cancelled
AutoTestCI / rtsmart/riscv64 (push) Has been cancelled
AutoTestCI / components/utest (push) Has been cancelled
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
[tools]:修复iar添加宏不完全 参考#10456
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user