From ed725350a99b3e0406ff29ff9157abd6fb5044f6 Mon Sep 17 00:00:00 2001 From: tangyuxin <462747508@qq.com> Date: Sat, 19 Jan 2019 15:16:14 +0800 Subject: [PATCH] =?UTF-8?q?[tools]=20=E4=BF=AE=E5=A4=8D=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E8=A1=8C=E4=BD=BF=E7=94=A8=20iar=20=E5=B7=A5=E5=85=B7=E9=93=BE?= =?UTF-8?q?=EF=BC=8C=E5=BA=93=E6=96=87=E4=BB=B6=E9=93=BE=E6=8E=A5=E4=B8=8D?= =?UTF-8?q?=E4=B8=8A=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/amebaz/SConstruct | 2 +- bsp/gd32303e-eval/SConstruct | 2 +- bsp/gd32450z-eval/SConstruct | 2 +- bsp/imxrt/imxrt1050-ArchMix/SConstruct | 2 +- bsp/imxrt/imxrt1050-evk/SConstruct | 2 +- bsp/imxrt1052-evk/SConstruct | 6 +++--- bsp/lpc54114-lite/SConstruct | 2 +- bsp/lpc824/SConstruct | 6 +++--- bsp/mb9bf500r/SConstruct | 6 +++--- bsp/mb9bf506r/SConstruct | 6 +++--- bsp/mb9bf618s/SConstruct | 6 +++--- bsp/nuvoton_nuc472/SConstruct | 6 +++--- bsp/swm320-lq100/SConstruct | 6 +++--- bsp/upd70f3454/SConstruct | 4 ++-- tools/building.py | 7 +++++++ 15 files changed, 36 insertions(+), 29 deletions(-) diff --git a/bsp/amebaz/SConstruct b/bsp/amebaz/SConstruct index 19506eba0..713fe1544 100644 --- a/bsp/amebaz/SConstruct +++ b/bsp/amebaz/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/gd32303e-eval/SConstruct b/bsp/gd32303e-eval/SConstruct index 4e05637e6..1cdbaab4a 100644 --- a/bsp/gd32303e-eval/SConstruct +++ b/bsp/gd32303e-eval/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/gd32450z-eval/SConstruct b/bsp/gd32450z-eval/SConstruct index 27ac9b024..adf9077ea 100644 --- a/bsp/gd32450z-eval/SConstruct +++ b/bsp/gd32450z-eval/SConstruct @@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/imxrt/imxrt1050-ArchMix/SConstruct b/bsp/imxrt/imxrt1050-ArchMix/SConstruct index ea53aac13..2b4a2ead7 100644 --- a/bsp/imxrt/imxrt1050-ArchMix/SConstruct +++ b/bsp/imxrt/imxrt1050-ArchMix/SConstruct @@ -35,7 +35,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/imxrt/imxrt1050-evk/SConstruct b/bsp/imxrt/imxrt1050-evk/SConstruct index 5f99b4eed..4b172a353 100644 --- a/bsp/imxrt/imxrt1050-evk/SConstruct +++ b/bsp/imxrt/imxrt1050-evk/SConstruct @@ -35,7 +35,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/imxrt1052-evk/SConstruct b/bsp/imxrt1052-evk/SConstruct index f6e51cbf6..be5ba963c 100644 --- a/bsp/imxrt1052-evk/SConstruct +++ b/bsp/imxrt1052-evk/SConstruct @@ -34,9 +34,9 @@ else: env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': - env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) - env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map']) + env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) + env.Replace(ARFLAGS = ['']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/lpc54114-lite/SConstruct b/bsp/lpc54114-lite/SConstruct index ab84f82f3..aa0f6a15a 100644 --- a/bsp/lpc54114-lite/SConstruct +++ b/bsp/lpc54114-lite/SConstruct @@ -28,7 +28,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/lpc824/SConstruct b/bsp/lpc824/SConstruct index 9d111f882..a87696475 100644 --- a/bsp/lpc824/SConstruct +++ b/bsp/lpc824/SConstruct @@ -22,9 +22,9 @@ env = Environment(tools = ['mingw'], env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': - env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) - env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map']) + env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) + env.Replace(ARFLAGS = ['']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/mb9bf500r/SConstruct b/bsp/mb9bf500r/SConstruct index 1deefb8ff..be2a125e2 100644 --- a/bsp/mb9bf500r/SConstruct +++ b/bsp/mb9bf500r/SConstruct @@ -20,9 +20,9 @@ env = Environment(tools = ['mingw'], env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': - env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map']) - env.Replace(ARFLAGS = '') + env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) + env.Replace(ARFLAGS = ['']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/mb9bf506r/SConstruct b/bsp/mb9bf506r/SConstruct index 8c5843910..5c060833f 100644 --- a/bsp/mb9bf506r/SConstruct +++ b/bsp/mb9bf506r/SConstruct @@ -20,9 +20,9 @@ env = Environment(tools = ['mingw'], env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': - env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map']) - env.Replace(ARFLAGS = '') + env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) + env.Replace(ARFLAGS = ['']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/mb9bf618s/SConstruct b/bsp/mb9bf618s/SConstruct index 8c5843910..5c060833f 100644 --- a/bsp/mb9bf618s/SConstruct +++ b/bsp/mb9bf618s/SConstruct @@ -20,9 +20,9 @@ env = Environment(tools = ['mingw'], env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': - env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map']) - env.Replace(ARFLAGS = '') + env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) + env.Replace(ARFLAGS = ['']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/nuvoton_nuc472/SConstruct b/bsp/nuvoton_nuc472/SConstruct index ece15e2a0..9257163ae 100644 --- a/bsp/nuvoton_nuc472/SConstruct +++ b/bsp/nuvoton_nuc472/SConstruct @@ -20,9 +20,9 @@ env = Environment(tools = ['mingw'], env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': - env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) - env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map']) + env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) + env.Replace(ARFLAGS = ['']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/swm320-lq100/SConstruct b/bsp/swm320-lq100/SConstruct index 331f1056f..44567aea7 100644 --- a/bsp/swm320-lq100/SConstruct +++ b/bsp/swm320-lq100/SConstruct @@ -25,9 +25,9 @@ env = Environment(tools = ['mingw'], env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': - env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) - env.Replace(ARFLAGS = ['']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rtthread.map']) + env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) + env.Replace(ARFLAGS = ['']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/bsp/upd70f3454/SConstruct b/bsp/upd70f3454/SConstruct index 589cdbeb8..a342385d8 100644 --- a/bsp/upd70f3454/SConstruct +++ b/bsp/upd70f3454/SConstruct @@ -21,8 +21,8 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) if rtconfig.PLATFORM == 'iar': env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) - env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -f lnk70f3454.xcl -l rtthread.map -Omotorola-s28=$TARGET']) - env.Replace(ARFLAGS = '') + env.Replace(ARFLAGS = ['']) + env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') Export('RTT_ROOT') Export('rtconfig') diff --git a/tools/building.py b/tools/building.py index ef1cb3da6..978c0f723 100644 --- a/tools/building.py +++ b/tools/building.py @@ -273,6 +273,13 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ env['LIBLINKSUFFIX'] = '.lib' env['LIBDIRPREFIX'] = '--userlibpath ' + elif rtconfig.PLATFORM == 'iar': + env['LIBPREFIX'] = '' + env['LIBSUFFIX'] = '.a' + env['LIBLINKPREFIX'] = '' + env['LIBLINKSUFFIX'] = '.a' + env['LIBDIRPREFIX'] = '--search ' + # patch for win32 spawn if env['PLATFORM'] == 'win32': win32_spawn = Win32Spawn() -- GitLab