From dd94198bd6acaaf03324774fe415df3ca379d1f5 Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Mon, 15 Aug 2022 10:32:27 -0400 Subject: [PATCH] [gcc][armcc][armclang] rtconfig.CROSS_TOOL->rtconfig.PLATFORM --- bsp/apm32/apm32f103xe-minibroard/SConstruct | 2 +- bsp/apm32/apm32f407ig-minibroard/SConstruct | 2 +- .../apm32f407ig-minibroard/board/SConscript | 6 +++--- bsp/at32/at32f413-start/board/SConscript | 4 ++-- bsp/at32/at32f415-start/board/SConscript | 4 ++-- bsp/at91/at91sam9260/platform/SConscript | 5 +---- bsp/at91/at91sam9g45/platform/SConscript | 5 +---- bsp/cypress/psoc6-cy8cproto-4343w/SConstruct | 2 +- .../psoc6-cy8cproto-4343w/board/SConscript | 2 +- bsp/cypress/psoc6-cy8cproto-4343w/rtconfig.py | 4 ++-- bsp/gd32/arm/docs/GD32_ARM系列BSP制作教程.md | 8 ++++---- bsp/gd32/arm/gd32103c-eval/SConstruct | 2 +- bsp/gd32/arm/gd32103c-eval/board/SConscript | 6 +++--- bsp/gd32/arm/gd32103c-eval/rtconfig.py | 4 ++-- bsp/gd32/arm/gd32105c-eval/SConstruct | 2 +- bsp/gd32/arm/gd32105c-eval/board/SConscript | 6 +++--- bsp/gd32/arm/gd32105c-eval/rtconfig.py | 4 ++-- bsp/gd32/arm/gd32105r-start/SConstruct | 2 +- bsp/gd32/arm/gd32105r-start/board/SConscript | 6 +++--- bsp/gd32/arm/gd32105r-start/rtconfig.py | 4 ++-- bsp/gd32/arm/gd32107c-eval/SConstruct | 2 +- bsp/gd32/arm/gd32107c-eval/board/SConscript | 6 +++--- bsp/gd32/arm/gd32107c-eval/rtconfig.py | 4 ++-- bsp/gd32/arm/gd32205r-start/SConstruct | 2 +- bsp/gd32/arm/gd32205r-start/board/SConscript | 6 +++--- bsp/gd32/arm/gd32205r-start/rtconfig.py | 4 ++-- bsp/gd32/arm/gd32207i-eval/SConstruct | 2 +- bsp/gd32/arm/gd32207i-eval/board/SConscript | 6 +++--- bsp/gd32/arm/gd32207i-eval/rtconfig.py | 4 ++-- bsp/gd32/arm/gd32303e-eval/SConstruct | 2 +- bsp/gd32/arm/gd32303e-eval/board/SConscript | 6 +++--- bsp/gd32/arm/gd32303e-eval/rtconfig.py | 4 ++-- bsp/gd32/arm/gd32305r-start/SConstruct | 2 +- bsp/gd32/arm/gd32305r-start/board/SConscript | 6 +++--- bsp/gd32/arm/gd32305r-start/rtconfig.py | 4 ++-- bsp/gd32/arm/gd32307e-start/SConstruct | 2 +- bsp/gd32/arm/gd32307e-start/board/SConscript | 6 +++--- bsp/gd32/arm/gd32307e-start/rtconfig.py | 4 ++-- bsp/gd32/arm/gd32407v-start/SConstruct | 2 +- bsp/gd32/arm/gd32407v-start/board/SConscript | 6 +++--- bsp/gd32/arm/gd32407v-start/rtconfig.py | 4 ++-- bsp/gd32/arm/gd32450z-eval/SConstruct | 2 +- bsp/gd32/arm/gd32450z-eval/board/SConscript | 6 +++--- bsp/gd32/arm/gd32450z-eval/rtconfig.py | 4 ++-- .../risc-v/docs/GD32_RISC-V系列BSP制作教程.md | 2 +- .../risc-v/gd32vf103r-start/board/SConscript | 2 +- bsp/gd32/risc-v/gd32vf103v-eval/board/SConscript | 2 +- bsp/hc32/ev_hc32f460_lqfp100_v2/SConstruct | 2 +- bsp/hc32/ev_hc32f460_lqfp100_v2/board/SConscript | 6 +++--- bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.py | 2 +- bsp/hc32/ev_hc32f4a0_lqfp176/board/SConscript | 4 ++-- .../imxrt1021-nxp-evk/applications/SConscript | 2 +- bsp/imxrt/imxrt1021-nxp-evk/board/SConscript | 2 +- bsp/imxrt/imxrt1021-nxp-evk/xip/SConscript | 2 +- .../imxrt1170-nxp-evk/applications/SConscript | 2 +- bsp/imxrt/imxrt1170-nxp-evk/xip/SConscript | 2 +- bsp/imxrt/libraries/MIMXRT1020/SConscript | 4 ++-- bsp/imxrt/libraries/MIMXRT1170/SConscript | 6 +++--- bsp/n32/n32g45xvl-stb/SConstruct | 2 +- bsp/n32/n32g45xvl-stb/board/SConscript | 4 ++-- bsp/n32/n32g45xvl-stb/rtconfig.py | 4 ++-- bsp/nrf5x/docs/nRF5x系列BSP制作教程.md | 6 +++--- bsp/renesas/libraries/bsp-template/SConscript | 7 ++----- .../bsp-template/board/ports/SConscript | 4 ++-- bsp/renesas/libraries/bsp-template/ra/SConscript | 13 ++----------- .../libraries/bsp-template/ra_cfg/SConscript | 7 ++----- .../libraries/bsp-template/ra_gen/SConscript | 7 ++----- bsp/renesas/ra2l1-cpk/QE-Touch/SConscript | 12 ++++-------- bsp/renesas/ra2l1-cpk/SConscript | 9 +++------ bsp/renesas/ra2l1-cpk/SConstruct | 2 +- bsp/renesas/ra2l1-cpk/board/ports/SConscript | 6 +++--- bsp/renesas/ra2l1-cpk/ra/SConscript | 15 +++------------ bsp/renesas/ra2l1-cpk/ra_cfg/SConscript | 6 +++--- bsp/renesas/ra2l1-cpk/ra_gen/SConscript | 9 +++------ bsp/renesas/ra2l1-cpk/rtconfig.py | 2 +- bsp/renesas/ra6m4-cpk/SConscript | 7 ++----- bsp/renesas/ra6m4-cpk/board/ports/SConscript | 4 ++-- bsp/renesas/ra6m4-cpk/ra/SConscript | 13 ++----------- bsp/renesas/ra6m4-cpk/ra_cfg/SConscript | 7 ++----- bsp/renesas/ra6m4-cpk/ra_gen/SConscript | 7 ++----- bsp/renesas/ra6m4-iot/SConscript | 7 ++----- bsp/renesas/ra6m4-iot/board/ports/SConscript | 4 ++-- bsp/renesas/ra6m4-iot/ra/SConscript | 13 ++----------- bsp/renesas/ra6m4-iot/ra_cfg/SConscript | 7 ++----- bsp/renesas/ra6m4-iot/ra_gen/SConscript | 7 ++----- bsp/rockchip/rk2108/driver/SConscript | 6 +++--- bsp/stm32/stm32f103-100ask-mini/SConstruct | 2 +- bsp/stm32/stm32f103-100ask-mini/board/SConscript | 4 ++-- bsp/stm32/stm32f103-100ask-mini/rtconfig.py | 2 +- bsp/stm32/stm32f103-100ask-pro/SConstruct | 2 +- bsp/stm32/stm32f103-100ask-pro/board/SConscript | 4 ++-- bsp/stm32/stm32f103-100ask-pro/rtconfig.py | 2 +- .../board/ports/fal/SConscript | 6 ++---- bsp/swm341/libraries/SConscript | 6 +++--- bsp/swm341/rtconfig.py | 4 ++-- components/drivers/spi/SConscript | 6 ++---- components/libc/cplusplus/SConscript | 16 +++++++--------- documentation/scons/scons.md | 2 +- tools/building.py | 10 +++++----- tools/cmake.py | 10 +++++----- 100 files changed, 202 insertions(+), 287 deletions(-) diff --git a/bsp/apm32/apm32f103xe-minibroard/SConstruct b/bsp/apm32/apm32f103xe-minibroard/SConstruct index adca955a4e..401ecfa098 100644 --- a/bsp/apm32/apm32f103xe-minibroard/SConstruct +++ b/bsp/apm32/apm32f103xe-minibroard/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/apm32/apm32f407ig-minibroard/SConstruct b/bsp/apm32/apm32f407ig-minibroard/SConstruct index d763d7cdea..1bc0b6858b 100644 --- a/bsp/apm32/apm32f407ig-minibroard/SConstruct +++ b/bsp/apm32/apm32f407ig-minibroard/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/apm32/apm32f407ig-minibroard/board/SConscript b/bsp/apm32/apm32f407ig-minibroard/board/SConscript index 46526580e9..1c55dd6c73 100644 --- a/bsp/apm32/apm32f407ig-minibroard/board/SConscript +++ b/bsp/apm32/apm32f407ig-minibroard/board/SConscript @@ -15,13 +15,13 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'keil': +if rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/APM32F4xx_Library/Device/Geehy/APM32F4xx/Source/arm/startup_apm32f40x.s'] -if rtconfig.CROSS_TOOL == 'iar': +if rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/APM32F4xx_Library/Device/Geehy/APM32F4xx/Source/iar/startup_apm32f40x.s'] -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/APM32F4xx_Library/Device/Geehy/APM32F4xx/Source/gcc/startup_apm32f40x.s'] # You can select chips from the list above diff --git a/bsp/at32/at32f413-start/board/SConscript b/bsp/at32/at32f413-start/board/SConscript index 57b467f6cc..7195c2f83f 100644 --- a/bsp/at32/at32f413-start/board/SConscript +++ b/bsp/at32/at32f413-start/board/SConscript @@ -17,9 +17,9 @@ path += [cwd + '/inc'] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/AT32F413_Firmware_Library/cmsis/cm4/device_support/startup/gcc/startup_at32f413.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/AT32F413_Firmware_Library/cmsis/cm4/device_support/startup/mdk/startup_at32f413.s'] elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/AT32F413_Firmware_Library/cmsis/cm4/device_support/startup/iar/startup_at32f413.s'] diff --git a/bsp/at32/at32f415-start/board/SConscript b/bsp/at32/at32f415-start/board/SConscript index 1845cbcce1..6b0b922ebd 100644 --- a/bsp/at32/at32f415-start/board/SConscript +++ b/bsp/at32/at32f415-start/board/SConscript @@ -17,9 +17,9 @@ path += [cwd + '/inc'] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/AT32F415_Firmware_Library/cmsis/cm4/device_support/startup/gcc/startup_at32f415.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/AT32F415_Firmware_Library/cmsis/cm4/device_support/startup/mdk/startup_at32f415.s'] elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/AT32F415_Firmware_Library/cmsis/cm4/device_support/startup/iar/startup_at32f415.s'] diff --git a/bsp/at91/at91sam9260/platform/SConscript b/bsp/at91/at91sam9260/platform/SConscript index 6604d06ef9..8c9a16e0a6 100644 --- a/bsp/at91/at91sam9260/platform/SConscript +++ b/bsp/at91/at91sam9260/platform/SConscript @@ -15,10 +15,7 @@ if rtconfig.PLATFORM in ['gcc']: if rtconfig.PLATFORM in ['iccarm']: src = Glob('*.c') + Glob('*_iar.S') -if rtconfig.PLATFORM == 'cl': - src = Glob('*.c') - -if rtconfig.PLATFORM == 'mingw': +if rtconfig.PLATFORM in ['cl', 'mingw']: src = Glob('*.c') group = DefineGroup('Platform', src, depend = [''], CPPPATH = CPPPATH) diff --git a/bsp/at91/at91sam9g45/platform/SConscript b/bsp/at91/at91sam9g45/platform/SConscript index 6604d06ef9..8c9a16e0a6 100644 --- a/bsp/at91/at91sam9g45/platform/SConscript +++ b/bsp/at91/at91sam9g45/platform/SConscript @@ -15,10 +15,7 @@ if rtconfig.PLATFORM in ['gcc']: if rtconfig.PLATFORM in ['iccarm']: src = Glob('*.c') + Glob('*_iar.S') -if rtconfig.PLATFORM == 'cl': - src = Glob('*.c') - -if rtconfig.PLATFORM == 'mingw': +if rtconfig.PLATFORM in ['cl', 'mingw']: src = Glob('*.c') group = DefineGroup('Platform', src, depend = [''], CPPPATH = CPPPATH) diff --git a/bsp/cypress/psoc6-cy8cproto-4343w/SConstruct b/bsp/cypress/psoc6-cy8cproto-4343w/SConstruct index 0d1cb6a24d..ed03635714 100644 --- a/bsp/cypress/psoc6-cy8cproto-4343w/SConstruct +++ b/bsp/cypress/psoc6-cy8cproto-4343w/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') diff --git a/bsp/cypress/psoc6-cy8cproto-4343w/board/SConscript b/bsp/cypress/psoc6-cy8cproto-4343w/board/SConscript index 644e51cf91..a6cdd0eedc 100644 --- a/bsp/cypress/psoc6-cy8cproto-4343w/board/SConscript +++ b/bsp/cypress/psoc6-cy8cproto-4343w/board/SConscript @@ -27,7 +27,7 @@ path += [cwd + '/ports'] startup_path_prefix = SDK_LIB -if rtconfig.PLATFORM == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/IFX_PSOC6_HAL/TARGET_CY8CKIT-062S2-43012/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/startup_psoc6_02_cm4.S'] src += [startup_path_prefix + diff --git a/bsp/cypress/psoc6-cy8cproto-4343w/rtconfig.py b/bsp/cypress/psoc6-cy8cproto-4343w/rtconfig.py index f751080417..25e6679827 100644 --- a/bsp/cypress/psoc6-cy8cproto-4343w/rtconfig.py +++ b/bsp/cypress/psoc6-cy8cproto-4343w/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armclang' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/gd32/arm/docs/GD32_ARM系列BSP制作教程.md b/bsp/gd32/arm/docs/GD32_ARM系列BSP制作教程.md index 6abba300a4..3a33fd5a68 100644 --- a/bsp/gd32/arm/docs/GD32_ARM系列BSP制作教程.md +++ b/bsp/gd32/arm/docs/GD32_ARM系列BSP制作教程.md @@ -99,7 +99,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') @@ -620,11 +620,11 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/GCC/startup_gd32f4xx.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/ARM/startup_gd32f4xx.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/IAR/startup_gd32f4xx.s'] CPPDEFINES = ['GD32F407'] diff --git a/bsp/gd32/arm/gd32103c-eval/SConstruct b/bsp/gd32/arm/gd32103c-eval/SConstruct index 4e87945853..ca839efaac 100644 --- a/bsp/gd32/arm/gd32103c-eval/SConstruct +++ b/bsp/gd32/arm/gd32103c-eval/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/gd32/arm/gd32103c-eval/board/SConscript b/bsp/gd32/arm/gd32103c-eval/board/SConscript index 95b0a6e9ac..0762046a90 100644 --- a/bsp/gd32/arm/gd32103c-eval/board/SConscript +++ b/bsp/gd32/arm/gd32103c-eval/board/SConscript @@ -15,11 +15,11 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/GCC/startup_gd32f10x_hd.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/ARM/startup_gd32f10x_hd.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/IAR/startup_gd32f10x_hd.s'] CPPDEFINES = ['GD32F10X_HD'] diff --git a/bsp/gd32/arm/gd32103c-eval/rtconfig.py b/bsp/gd32/arm/gd32103c-eval/rtconfig.py index 4285e6b03c..76aab52412 100644 --- a/bsp/gd32/arm/gd32103c-eval/rtconfig.py +++ b/bsp/gd32/arm/gd32103c-eval/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/gd32/arm/gd32105c-eval/SConstruct b/bsp/gd32/arm/gd32105c-eval/SConstruct index 4e87945853..ca839efaac 100644 --- a/bsp/gd32/arm/gd32105c-eval/SConstruct +++ b/bsp/gd32/arm/gd32105c-eval/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/gd32/arm/gd32105c-eval/board/SConscript b/bsp/gd32/arm/gd32105c-eval/board/SConscript index c1f4a6001b..a85b0a42ae 100644 --- a/bsp/gd32/arm/gd32105c-eval/board/SConscript +++ b/bsp/gd32/arm/gd32105c-eval/board/SConscript @@ -15,11 +15,11 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/GCC/startup_gd32f10x_cl.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/ARM/startup_gd32f10x_cl.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/IAR/startup_gd32f10x_cl.s'] CPPDEFINES = ['GD32F10X_CL'] diff --git a/bsp/gd32/arm/gd32105c-eval/rtconfig.py b/bsp/gd32/arm/gd32105c-eval/rtconfig.py index 4285e6b03c..76aab52412 100644 --- a/bsp/gd32/arm/gd32105c-eval/rtconfig.py +++ b/bsp/gd32/arm/gd32105c-eval/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/gd32/arm/gd32105r-start/SConstruct b/bsp/gd32/arm/gd32105r-start/SConstruct index 4e87945853..ca839efaac 100644 --- a/bsp/gd32/arm/gd32105r-start/SConstruct +++ b/bsp/gd32/arm/gd32105r-start/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/gd32/arm/gd32105r-start/board/SConscript b/bsp/gd32/arm/gd32105r-start/board/SConscript index c1f4a6001b..a85b0a42ae 100644 --- a/bsp/gd32/arm/gd32105r-start/board/SConscript +++ b/bsp/gd32/arm/gd32105r-start/board/SConscript @@ -15,11 +15,11 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/GCC/startup_gd32f10x_cl.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/ARM/startup_gd32f10x_cl.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/IAR/startup_gd32f10x_cl.s'] CPPDEFINES = ['GD32F10X_CL'] diff --git a/bsp/gd32/arm/gd32105r-start/rtconfig.py b/bsp/gd32/arm/gd32105r-start/rtconfig.py index 1839e540bf..7c11694b78 100644 --- a/bsp/gd32/arm/gd32105r-start/rtconfig.py +++ b/bsp/gd32/arm/gd32105r-start/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/gd32/arm/gd32107c-eval/SConstruct b/bsp/gd32/arm/gd32107c-eval/SConstruct index 4e87945853..ca839efaac 100644 --- a/bsp/gd32/arm/gd32107c-eval/SConstruct +++ b/bsp/gd32/arm/gd32107c-eval/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/gd32/arm/gd32107c-eval/board/SConscript b/bsp/gd32/arm/gd32107c-eval/board/SConscript index c1f4a6001b..a85b0a42ae 100644 --- a/bsp/gd32/arm/gd32107c-eval/board/SConscript +++ b/bsp/gd32/arm/gd32107c-eval/board/SConscript @@ -15,11 +15,11 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/GCC/startup_gd32f10x_cl.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/ARM/startup_gd32f10x_cl.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/IAR/startup_gd32f10x_cl.s'] CPPDEFINES = ['GD32F10X_CL'] diff --git a/bsp/gd32/arm/gd32107c-eval/rtconfig.py b/bsp/gd32/arm/gd32107c-eval/rtconfig.py index 4285e6b03c..76aab52412 100644 --- a/bsp/gd32/arm/gd32107c-eval/rtconfig.py +++ b/bsp/gd32/arm/gd32107c-eval/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/gd32/arm/gd32205r-start/SConstruct b/bsp/gd32/arm/gd32205r-start/SConstruct index c8d7363d6d..acf379fa37 100644 --- a/bsp/gd32/arm/gd32205r-start/SConstruct +++ b/bsp/gd32/arm/gd32205r-start/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/gd32/arm/gd32205r-start/board/SConscript b/bsp/gd32/arm/gd32205r-start/board/SConscript index d1c8023578..e3e280f6ae 100644 --- a/bsp/gd32/arm/gd32205r-start/board/SConscript +++ b/bsp/gd32/arm/gd32205r-start/board/SConscript @@ -15,11 +15,11 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/GCC/startup_gd32f20x_cl.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/ARM/startup_gd32f20x_cl.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/IAR/startup_gd32f20x_cl.s'] CPPDEFINES = ['GD32F20X_CL'] diff --git a/bsp/gd32/arm/gd32205r-start/rtconfig.py b/bsp/gd32/arm/gd32205r-start/rtconfig.py index 4285e6b03c..76aab52412 100644 --- a/bsp/gd32/arm/gd32205r-start/rtconfig.py +++ b/bsp/gd32/arm/gd32205r-start/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/gd32/arm/gd32207i-eval/SConstruct b/bsp/gd32/arm/gd32207i-eval/SConstruct index c8d7363d6d..acf379fa37 100644 --- a/bsp/gd32/arm/gd32207i-eval/SConstruct +++ b/bsp/gd32/arm/gd32207i-eval/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/gd32/arm/gd32207i-eval/board/SConscript b/bsp/gd32/arm/gd32207i-eval/board/SConscript index d1c8023578..e3e280f6ae 100644 --- a/bsp/gd32/arm/gd32207i-eval/board/SConscript +++ b/bsp/gd32/arm/gd32207i-eval/board/SConscript @@ -15,11 +15,11 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/GCC/startup_gd32f20x_cl.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/ARM/startup_gd32f20x_cl.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/IAR/startup_gd32f20x_cl.s'] CPPDEFINES = ['GD32F20X_CL'] diff --git a/bsp/gd32/arm/gd32207i-eval/rtconfig.py b/bsp/gd32/arm/gd32207i-eval/rtconfig.py index 4285e6b03c..76aab52412 100644 --- a/bsp/gd32/arm/gd32207i-eval/rtconfig.py +++ b/bsp/gd32/arm/gd32207i-eval/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/gd32/arm/gd32303e-eval/SConstruct b/bsp/gd32/arm/gd32303e-eval/SConstruct index a39a8933ac..a69485b2a1 100644 --- a/bsp/gd32/arm/gd32303e-eval/SConstruct +++ b/bsp/gd32/arm/gd32303e-eval/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/gd32/arm/gd32303e-eval/board/SConscript b/bsp/gd32/arm/gd32303e-eval/board/SConscript index 1d4c0408eb..4952e20f50 100644 --- a/bsp/gd32/arm/gd32303e-eval/board/SConscript +++ b/bsp/gd32/arm/gd32303e-eval/board/SConscript @@ -15,11 +15,11 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/GCC/startup_gd32f30x_hd.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/ARM/startup_gd32f30x_hd.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/IAR/startup_gd32f30x_hd.s'] CPPDEFINES = ['GD32F30X_HD'] diff --git a/bsp/gd32/arm/gd32303e-eval/rtconfig.py b/bsp/gd32/arm/gd32303e-eval/rtconfig.py index a91905a233..6f74f7c0b9 100644 --- a/bsp/gd32/arm/gd32303e-eval/rtconfig.py +++ b/bsp/gd32/arm/gd32303e-eval/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/gd32/arm/gd32305r-start/SConstruct b/bsp/gd32/arm/gd32305r-start/SConstruct index a39a8933ac..a69485b2a1 100644 --- a/bsp/gd32/arm/gd32305r-start/SConstruct +++ b/bsp/gd32/arm/gd32305r-start/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/gd32/arm/gd32305r-start/board/SConscript b/bsp/gd32/arm/gd32305r-start/board/SConscript index ec6b7bf3c1..09ae44cf73 100644 --- a/bsp/gd32/arm/gd32305r-start/board/SConscript +++ b/bsp/gd32/arm/gd32305r-start/board/SConscript @@ -15,11 +15,11 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/GCC/startup_gd32f30x_cl.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/ARM/startup_gd32f30x_cl.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/IAR/startup_gd32f30x_cl.s'] CPPDEFINES = ['GD32F30X_CL'] diff --git a/bsp/gd32/arm/gd32305r-start/rtconfig.py b/bsp/gd32/arm/gd32305r-start/rtconfig.py index a91905a233..6f74f7c0b9 100644 --- a/bsp/gd32/arm/gd32305r-start/rtconfig.py +++ b/bsp/gd32/arm/gd32305r-start/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/gd32/arm/gd32307e-start/SConstruct b/bsp/gd32/arm/gd32307e-start/SConstruct index a39a8933ac..a69485b2a1 100644 --- a/bsp/gd32/arm/gd32307e-start/SConstruct +++ b/bsp/gd32/arm/gd32307e-start/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/gd32/arm/gd32307e-start/board/SConscript b/bsp/gd32/arm/gd32307e-start/board/SConscript index ec6b7bf3c1..09ae44cf73 100644 --- a/bsp/gd32/arm/gd32307e-start/board/SConscript +++ b/bsp/gd32/arm/gd32307e-start/board/SConscript @@ -15,11 +15,11 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/GCC/startup_gd32f30x_cl.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/ARM/startup_gd32f30x_cl.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/IAR/startup_gd32f30x_cl.s'] CPPDEFINES = ['GD32F30X_CL'] diff --git a/bsp/gd32/arm/gd32307e-start/rtconfig.py b/bsp/gd32/arm/gd32307e-start/rtconfig.py index a91905a233..6f74f7c0b9 100644 --- a/bsp/gd32/arm/gd32307e-start/rtconfig.py +++ b/bsp/gd32/arm/gd32307e-start/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/gd32/arm/gd32407v-start/SConstruct b/bsp/gd32/arm/gd32407v-start/SConstruct index 36481e3cea..0701e74ed5 100644 --- a/bsp/gd32/arm/gd32407v-start/SConstruct +++ b/bsp/gd32/arm/gd32407v-start/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/gd32/arm/gd32407v-start/board/SConscript b/bsp/gd32/arm/gd32407v-start/board/SConscript index 171600e2e1..0d775ec7dc 100644 --- a/bsp/gd32/arm/gd32407v-start/board/SConscript +++ b/bsp/gd32/arm/gd32407v-start/board/SConscript @@ -15,11 +15,11 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/GCC/startup_gd32f4xx.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/ARM/startup_gd32f4xx.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/IAR/startup_gd32f4xx.s'] CPPDEFINES = ['GD32F407'] diff --git a/bsp/gd32/arm/gd32407v-start/rtconfig.py b/bsp/gd32/arm/gd32407v-start/rtconfig.py index ba952e3598..7c1b52143c 100644 --- a/bsp/gd32/arm/gd32407v-start/rtconfig.py +++ b/bsp/gd32/arm/gd32407v-start/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/gd32/arm/gd32450z-eval/SConstruct b/bsp/gd32/arm/gd32450z-eval/SConstruct index 36481e3cea..0701e74ed5 100644 --- a/bsp/gd32/arm/gd32450z-eval/SConstruct +++ b/bsp/gd32/arm/gd32450z-eval/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/gd32/arm/gd32450z-eval/board/SConscript b/bsp/gd32/arm/gd32450z-eval/board/SConscript index 77a18f74e1..cc9fd76fbd 100644 --- a/bsp/gd32/arm/gd32450z-eval/board/SConscript +++ b/bsp/gd32/arm/gd32450z-eval/board/SConscript @@ -15,11 +15,11 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/GCC/startup_gd32f4xx.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/ARM/startup_gd32f4xx.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/IAR/startup_gd32f4xx.s'] CPPDEFINES = ['GD32F450'] diff --git a/bsp/gd32/arm/gd32450z-eval/rtconfig.py b/bsp/gd32/arm/gd32450z-eval/rtconfig.py index c0c0b203cf..34a3ca9974 100644 --- a/bsp/gd32/arm/gd32450z-eval/rtconfig.py +++ b/bsp/gd32/arm/gd32450z-eval/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/gd32/risc-v/docs/GD32_RISC-V系列BSP制作教程.md b/bsp/gd32/risc-v/docs/GD32_RISC-V系列BSP制作教程.md index 8e8622e5a0..d258deba00 100644 --- a/bsp/gd32/risc-v/docs/GD32_RISC-V系列BSP制作教程.md +++ b/bsp/gd32/risc-v/docs/GD32_RISC-V系列BSP制作教程.md @@ -416,7 +416,7 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32VF103_Firmware_Library/RISCV/env_Eclipse/start.S'] src += [startup_path_prefix + '/GD32VF103_Firmware_Library/RISCV/env_Eclipse/entry.S'] diff --git a/bsp/gd32/risc-v/gd32vf103r-start/board/SConscript b/bsp/gd32/risc-v/gd32vf103r-start/board/SConscript index f21fc1fdd8..b3d28385e6 100644 --- a/bsp/gd32/risc-v/gd32vf103r-start/board/SConscript +++ b/bsp/gd32/risc-v/gd32vf103r-start/board/SConscript @@ -15,7 +15,7 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32VF103_Firmware_Library/RISCV/env_Eclipse/start.S'] src += [startup_path_prefix + '/GD32VF103_Firmware_Library/RISCV/env_Eclipse/entry.S'] diff --git a/bsp/gd32/risc-v/gd32vf103v-eval/board/SConscript b/bsp/gd32/risc-v/gd32vf103v-eval/board/SConscript index 25ebfdce5c..2215b51958 100644 --- a/bsp/gd32/risc-v/gd32vf103v-eval/board/SConscript +++ b/bsp/gd32/risc-v/gd32vf103v-eval/board/SConscript @@ -15,7 +15,7 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/GD32VF103_Firmware_Library/RISCV/env_Eclipse/start.S'] src += [startup_path_prefix + '/GD32VF103_Firmware_Library/RISCV/env_Eclipse/entry.S'] diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/SConstruct b/bsp/hc32/ev_hc32f460_lqfp100_v2/SConstruct index 2a85e43b75..fabdca1a7a 100644 --- a/bsp/hc32/ev_hc32f460_lqfp100_v2/SConstruct +++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/SConscript b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/SConscript index ac8a96453a..3941228424 100644 --- a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/SConscript +++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/SConscript @@ -18,11 +18,11 @@ path += [cwd + '/config'] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/hc32f460_ddl/drivers/cmsis/Device/HDSC/hc32f4xx/Source/GCC/startup_hc32f460.S'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/hc32f460_ddl/drivers/cmsis/Device/HDSC/hc32f4xx/Source/ARM/startup_hc32f460.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/hc32f460_ddl/drivers/cmsis/Device/HDSC/hc32f4xx/Source/IAR/startup_hc32f460.s'] CPPDEFINES = ['HC32F460'] diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.py b/bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.py index b0b7b6a25e..6545163d85 100644 --- a/bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.py +++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.py @@ -22,7 +22,7 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' + PLATFORM = 'iccarm' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.4' if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/hc32/ev_hc32f4a0_lqfp176/board/SConscript b/bsp/hc32/ev_hc32f4a0_lqfp176/board/SConscript index 367847c322..21d837326a 100644 --- a/bsp/hc32/ev_hc32f4a0_lqfp176/board/SConscript +++ b/bsp/hc32/ev_hc32f4a0_lqfp176/board/SConscript @@ -21,9 +21,9 @@ path += [cwd + '/config'] startup_path_prefix = SDK_LIB -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/hc32f4a0_ddl/drivers/cmsis/Device/HDSC/hc32f4xx/Source/GCC/startup_hc32f4a0.S'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/hc32f4a0_ddl/drivers/cmsis/Device/HDSC/hc32f4xx/Source/ARM/startup_hc32f4a0.s'] elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/hc32f4a0_ddl/drivers/cmsis/Device/HDSC/hc32f4xx/Source/IAR/startup_hc32f4a0.s'] diff --git a/bsp/imxrt/imxrt1021-nxp-evk/applications/SConscript b/bsp/imxrt/imxrt1021-nxp-evk/applications/SConscript index ab2275a135..050054c59f 100644 --- a/bsp/imxrt/imxrt1021-nxp-evk/applications/SConscript +++ b/bsp/imxrt/imxrt1021-nxp-evk/applications/SConscript @@ -7,7 +7,7 @@ src = Glob('*.c') CPPPATH = [cwd] # add for startup script -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: CPPDEFINES = ['__START=entry'] else: CPPDEFINES = [] diff --git a/bsp/imxrt/imxrt1021-nxp-evk/board/SConscript b/bsp/imxrt/imxrt1021-nxp-evk/board/SConscript index a16c5757ed..c492c8785d 100644 --- a/bsp/imxrt/imxrt1021-nxp-evk/board/SConscript +++ b/bsp/imxrt/imxrt1021-nxp-evk/board/SConscript @@ -14,7 +14,7 @@ CPPPATH = [cwd,cwd + '/MCUX_Config',cwd + '/ports'] CPPDEFINES = ['CPU_MIMXRT1021DAG5A', 'ENDIANNESS', 'STD=C99', 'SKIP_SYSCLK_INIT', 'EVK_MCIMXRM', 'FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL','XIP_EXTERNAL_FLASH=1', 'XIP_BOOT_HEADER_ENABLE=1'] -if rtconfig.CROSS_TOOL == 'keil': +if rtconfig.PLATFORM in ['armcc', 'armclang']: CPPDEFINES.append('__FPU_PRESENT=1') group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES) diff --git a/bsp/imxrt/imxrt1021-nxp-evk/xip/SConscript b/bsp/imxrt/imxrt1021-nxp-evk/xip/SConscript index 08fccdc6f4..9e02702f7d 100644 --- a/bsp/imxrt/imxrt1021-nxp-evk/xip/SConscript +++ b/bsp/imxrt/imxrt1021-nxp-evk/xip/SConscript @@ -7,7 +7,7 @@ if GetDepend('BSP_USING_QSPIFLASH'): src = Glob('*.c') CPPPATH = [cwd] - if rtconfig.CROSS_TOOL == 'keil': + if rtconfig.PLATFORM in ['armcc', 'armclang']: LINKFLAGS = '--keep=*(.boot_hdr.ivt)' LINKFLAGS += '--keep=*(.boot_hdr.boot_data)' LINKFLAGS += '--keep=*(.boot_hdr.dcd_data)' diff --git a/bsp/imxrt/imxrt1170-nxp-evk/applications/SConscript b/bsp/imxrt/imxrt1170-nxp-evk/applications/SConscript index ab2275a135..050054c59f 100644 --- a/bsp/imxrt/imxrt1170-nxp-evk/applications/SConscript +++ b/bsp/imxrt/imxrt1170-nxp-evk/applications/SConscript @@ -7,7 +7,7 @@ src = Glob('*.c') CPPPATH = [cwd] # add for startup script -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: CPPDEFINES = ['__START=entry'] else: CPPDEFINES = [] diff --git a/bsp/imxrt/imxrt1170-nxp-evk/xip/SConscript b/bsp/imxrt/imxrt1170-nxp-evk/xip/SConscript index 65e7fefebc..84d2e8e4f8 100644 --- a/bsp/imxrt/imxrt1170-nxp-evk/xip/SConscript +++ b/bsp/imxrt/imxrt1170-nxp-evk/xip/SConscript @@ -7,7 +7,7 @@ if GetDepend('BSP_USING_QSPIFLASH'): src = Glob('*.c') CPPPATH = [cwd] - if rtconfig.CROSS_TOOL == 'keil': + if rtconfig.PLATFORM in ['armcc', 'armclang']: LINKFLAGS = ' --keep=*(.boot_hdr.ivt)' LINKFLAGS += ' --keep=*(.boot_hdr.boot_data)' LINKFLAGS += ' --keep=*(.boot_hdr.dcd_data)' diff --git a/bsp/imxrt/libraries/MIMXRT1020/SConscript b/bsp/imxrt/libraries/MIMXRT1020/SConscript index 4a1a35c28b..85c992a4aa 100644 --- a/bsp/imxrt/libraries/MIMXRT1020/SConscript +++ b/bsp/imxrt/libraries/MIMXRT1020/SConscript @@ -10,9 +10,9 @@ src = Split(''' MIMXRT1021/drivers/fsl_cache.c ''') -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += ['MIMXRT1021/gcc/startup_MIMXRT1021.S'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += ['MIMXRT1021/arm/startup_MIMXRT1021.s'] elif rtconfig.PLATFORM in ['iccarm']: src += ['MIMXRT1021/iar/startup_MIMXRT1021.s'] diff --git a/bsp/imxrt/libraries/MIMXRT1170/SConscript b/bsp/imxrt/libraries/MIMXRT1170/SConscript index c5038664d8..af8e330de5 100644 --- a/bsp/imxrt/libraries/MIMXRT1170/SConscript +++ b/bsp/imxrt/libraries/MIMXRT1170/SConscript @@ -14,9 +14,9 @@ src = Split(''' MIMXRT1176/drivers/cm7/fsl_cache.c ''') -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += ['MIMXRT1176/gcc/startup_MIMXRT1176_cm7.S'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += ['MIMXRT1176/arm/startup_MIMXRT1176_cm7.s'] elif rtconfig.PLATFORM in ['iccarm']: src += ['MIMXRT1176/iar/startup_MIMXRT1176_cm7.s'] @@ -43,7 +43,7 @@ if GetDepend(['BSP_USING_SDIO']): if GetDepend(['BSP_USING_SDRAM']): src += ['MIMXRT1176/drivers/fsl_semc.c'] -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, ASFLAGS = '$ASFLAGS -D __STARTUP_CLEAR_BSS') else: group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path) diff --git a/bsp/n32/n32g45xvl-stb/SConstruct b/bsp/n32/n32g45xvl-stb/SConstruct index d6b0922512..36e9907207 100644 --- a/bsp/n32/n32g45xvl-stb/SConstruct +++ b/bsp/n32/n32g45xvl-stb/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') diff --git a/bsp/n32/n32g45xvl-stb/board/SConscript b/bsp/n32/n32g45xvl-stb/board/SConscript index ac5283ad3b..5977ae68a5 100644 --- a/bsp/n32/n32g45xvl-stb/board/SConscript +++ b/bsp/n32/n32g45xvl-stb/board/SConscript @@ -15,11 +15,11 @@ path = [cwd] startup_path_prefix = SDK_LIB -if rtconfig.PLATFORM == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/N32G45x_Firmware_Library/CMSIS/device/startup/startup_n32g45x_gcc.s'] elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/N32G45x_Firmware_Library/CMSIS/device/startup/startup_n32g45x.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/N32G45x_Firmware_Library/CMSIS/device/startup/startup_n32g45x_EWARM.s'] CPPDEFINES = ['N32G45X'] diff --git a/bsp/n32/n32g45xvl-stb/rtconfig.py b/bsp/n32/n32g45xvl-stb/rtconfig.py index b745c1acf0..71dc5b0aa2 100644 --- a/bsp/n32/n32g45xvl-stb/rtconfig.py +++ b/bsp/n32/n32g45xvl-stb/rtconfig.py @@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/bsp/nrf5x/docs/nRF5x系列BSP制作教程.md b/bsp/nrf5x/docs/nRF5x系列BSP制作教程.md index 651bb0f9b6..8e7ff6d47f 100644 --- a/bsp/nrf5x/docs/nRF5x系列BSP制作教程.md +++ b/bsp/nrf5x/docs/nRF5x系列BSP制作教程.md @@ -47,13 +47,13 @@ elif GetDepend('SOC_NRF51822') == True: define += ['NRF51822_XXAA'] src += ['./mdk/system_nrf51.c'] - if rtconfig.PLATFORM == 'armcc': + if rtconfig.PLATFORM in ['armcc']: src += ['./mdk/arm_startup_nrf51.s'] - if rtconfig.PLATFORM == 'gcc': + if rtconfig.PLATFORM in ['gcc']: src += ['./mdk/gcc_startup_nrf51.S'] - if rtconfig.PLATFORM == 'iccarm': + if rtconfig.PLATFORM in ['iccarm']: D_SRC += ['./mdk/iar_startup_nrf51.s'] ``` diff --git a/bsp/renesas/libraries/bsp-template/SConscript b/bsp/renesas/libraries/bsp-template/SConscript index 6a57c550af..aee8a3bb36 100644 --- a/bsp/renesas/libraries/bsp-template/SConscript +++ b/bsp/renesas/libraries/bsp-template/SConscript @@ -10,12 +10,9 @@ CPPPATH = [] list = os.listdir(cwd) if rtconfig.PLATFORM in ['iccarm']: - print("\nThe current project does not support iar build\n") + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM in ['gcc']: - CPPPATH = [cwd] - src = Glob('./src/*.c') -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': CPPPATH = [cwd] src = Glob('./src/*.c') diff --git a/bsp/renesas/libraries/bsp-template/board/ports/SConscript b/bsp/renesas/libraries/bsp-template/board/ports/SConscript index 6df0a4f30f..4871d7248b 100644 --- a/bsp/renesas/libraries/bsp-template/board/ports/SConscript +++ b/bsp/renesas/libraries/bsp-template/board/ports/SConscript @@ -12,9 +12,9 @@ if GetDepend(['BSP_USING_RW007']): CPPPATH = [cwd] LOCAL_CFLAGS = '' -if rtconfig.PLATFORM in ['gcc'] or rtconfig.PLATFORM == 'armclang': +if rtconfig.PLATFORM in ['gcc', 'armclang']: LOCAL_CFLAGS += ' -std=c99' -elif rtconfig.PLATFORM == 'armcc': +elif rtconfig.PLATFORM in ['armcc']: LOCAL_CFLAGS += ' --c99' group = DefineGroup('Drivers', src, depend = [], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS) diff --git a/bsp/renesas/libraries/bsp-template/ra/SConscript b/bsp/renesas/libraries/bsp-template/ra/SConscript index ec190608c8..1057357156 100644 --- a/bsp/renesas/libraries/bsp-template/ra/SConscript +++ b/bsp/renesas/libraries/bsp-template/ra/SConscript @@ -8,18 +8,9 @@ group = [] CPPPATH = [] if rtconfig.PLATFORM in ['iccarm']: - print("\nThe current project does not support iar build\n") + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM in ['gcc']: - src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c') - src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c'] - src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/startup.c'] - src += Glob(cwd + '/fsp/src/r_*/*.c') - CPPPATH = [ cwd + '/arm/CMSIS_5/CMSIS/Core/Include', - cwd + '/fsp/inc', - cwd + '/fsp/inc/api', - cwd + '/fsp/inc/instances',] -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c') src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c'] diff --git a/bsp/renesas/libraries/bsp-template/ra_cfg/SConscript b/bsp/renesas/libraries/bsp-template/ra_cfg/SConscript index 2d02f21e9b..21af4711c5 100644 --- a/bsp/renesas/libraries/bsp-template/ra_cfg/SConscript +++ b/bsp/renesas/libraries/bsp-template/ra_cfg/SConscript @@ -8,12 +8,9 @@ group = [] CPPPATH = [] if rtconfig.PLATFORM in ['iccarm']: - print("\nThe current project does not support iar build\n") + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM in ['gcc']: - src = Glob('*.c') - CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp'] -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': src = Glob('*.c') CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp'] diff --git a/bsp/renesas/libraries/bsp-template/ra_gen/SConscript b/bsp/renesas/libraries/bsp-template/ra_gen/SConscript index bbf3579ec9..09be271571 100644 --- a/bsp/renesas/libraries/bsp-template/ra_gen/SConscript +++ b/bsp/renesas/libraries/bsp-template/ra_gen/SConscript @@ -8,12 +8,9 @@ group = [] CPPPATH = [] if rtconfig.PLATFORM in ['iccarm']: - print("\nThe current project does not support iar build\n") + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM in ['gcc']: - src = Glob('*.c') - CPPPATH = [cwd, ] -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': src = Glob('*.c') CPPPATH = [cwd, ] diff --git a/bsp/renesas/ra2l1-cpk/QE-Touch/SConscript b/bsp/renesas/ra2l1-cpk/QE-Touch/SConscript index 4a240c23b5..f3fbb16bd8 100644 --- a/bsp/renesas/ra2l1-cpk/QE-Touch/SConscript +++ b/bsp/renesas/ra2l1-cpk/QE-Touch/SConscript @@ -10,17 +10,13 @@ CPPPATH = [] file = glob.glob('*.tifcfg') if len(file): - if rtconfig.PLATFORM == 'iar': - print("\nThe current project does not support iar build\n") + if rtconfig.PLATFORM in ['iccarm']: + print("\nThe current project does not support IAR build\n") Return('group') - elif rtconfig.PLATFORM == 'gcc': + elif rtconfig.PLATFORM in ['gcc', 'armclang']: src += ['qe_touch_config.c'] src += ['qe_sample_rtthread.c'] - CPPPATH = [cwd, ] - elif rtconfig.PLATFORM == 'armclang': - src += ['qe_touch_config.c'] - src += ['qe_sample_rtthread.c'] - CPPPATH = [cwd, ] + CPPPATH = [cwd] CPPDEFINES = ['QE_TOUCH_CONFIGURATION'] group = DefineGroup('QE-Touch', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) diff --git a/bsp/renesas/ra2l1-cpk/SConscript b/bsp/renesas/ra2l1-cpk/SConscript index ec711663f4..979a9d3429 100644 --- a/bsp/renesas/ra2l1-cpk/SConscript +++ b/bsp/renesas/ra2l1-cpk/SConscript @@ -9,13 +9,10 @@ src = [] CPPPATH = [] list = os.listdir(cwd) -if rtconfig.PLATFORM == 'iar': - print("\nThe current project does not support iar build\n") +if rtconfig.PLATFORM in ['iccarm']: + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM == 'gcc': - CPPPATH = [cwd + './src'] - src = Glob('./src/*.c') -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': CPPPATH = [cwd + './src'] src = Glob('./src/*.c') diff --git a/bsp/renesas/ra2l1-cpk/SConstruct b/bsp/renesas/ra2l1-cpk/SConstruct index 4a16be573d..d00d0dbeaa 100644 --- a/bsp/renesas/ra2l1-cpk/SConstruct +++ b/bsp/renesas/ra2l1-cpk/SConstruct @@ -25,7 +25,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') diff --git a/bsp/renesas/ra2l1-cpk/board/ports/SConscript b/bsp/renesas/ra2l1-cpk/board/ports/SConscript index 87126419c1..14529bc2fe 100644 --- a/bsp/renesas/ra2l1-cpk/board/ports/SConscript +++ b/bsp/renesas/ra2l1-cpk/board/ports/SConscript @@ -12,11 +12,11 @@ if GetDepend(['BSP_USING_RW007']): CPPPATH = [cwd] LOCAL_CCFLAGS = '' -if rtconfig.PLATFORM == 'gcc': +if rtconfig.PLATFORM in ['gcc']: LOCAL_CCFLAGS += ' -std=c99' -elif rtconfig.PLATFORM == 'armcc': +elif rtconfig.PLATFORM in ['armcc']: LOCAL_CCFLAGS += ' --c99' -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['armclang']: LOCAL_CCFLAGS += ' -std=c99' group = DefineGroup('Drivers', src, depend = [], CPPPATH = CPPPATH, LOCAL_CCFLAGS = LOCAL_CCFLAGS) diff --git a/bsp/renesas/ra2l1-cpk/ra/SConscript b/bsp/renesas/ra2l1-cpk/ra/SConscript index fd53aae32f..1057357156 100644 --- a/bsp/renesas/ra2l1-cpk/ra/SConscript +++ b/bsp/renesas/ra2l1-cpk/ra/SConscript @@ -7,19 +7,10 @@ src = [] group = [] CPPPATH = [] -if rtconfig.PLATFORM == 'iar': - print("\nThe current project does not support iar build\n") +if rtconfig.PLATFORM in ['iccarm']: + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM == 'gcc': - src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c') - src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c'] - src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/startup.c'] - src += Glob(cwd + '/fsp/src/r_*/*.c') - CPPPATH = [ cwd + '/arm/CMSIS_5/CMSIS/Core/Include', - cwd + '/fsp/inc', - cwd + '/fsp/inc/api', - cwd + '/fsp/inc/instances',] -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c') src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c'] diff --git a/bsp/renesas/ra2l1-cpk/ra_cfg/SConscript b/bsp/renesas/ra2l1-cpk/ra_cfg/SConscript index a23106c7dd..3a85112532 100644 --- a/bsp/renesas/ra2l1-cpk/ra_cfg/SConscript +++ b/bsp/renesas/ra2l1-cpk/ra_cfg/SConscript @@ -7,11 +7,11 @@ src = [] group = [] CPPPATH = [] -if rtconfig.PLATFORM == 'iar': - print("\nThe current project does not support iar build\n") +if rtconfig.PLATFORM in ['iccarm']: + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM == 'gcc'or 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: src = Glob('*.c') CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp'] diff --git a/bsp/renesas/ra2l1-cpk/ra_gen/SConscript b/bsp/renesas/ra2l1-cpk/ra_gen/SConscript index 40ab0bdf61..09be271571 100644 --- a/bsp/renesas/ra2l1-cpk/ra_gen/SConscript +++ b/bsp/renesas/ra2l1-cpk/ra_gen/SConscript @@ -7,13 +7,10 @@ src = [] group = [] CPPPATH = [] -if rtconfig.PLATFORM == 'iar': - print("\nThe current project does not support iar build\n") +if rtconfig.PLATFORM in ['iccarm']: + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM == 'gcc': - src = Glob('*.c') - CPPPATH = [cwd, ] -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': src = Glob('*.c') CPPPATH = [cwd, ] diff --git a/bsp/renesas/ra2l1-cpk/rtconfig.py b/bsp/renesas/ra2l1-cpk/rtconfig.py index 0bede7391a..8656096f71 100644 --- a/bsp/renesas/ra2l1-cpk/rtconfig.py +++ b/bsp/renesas/ra2l1-cpk/rtconfig.py @@ -20,7 +20,7 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armclang' EXEC_PATH = 'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' + PLATFORM = 'iccarm' EXEC_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench 8.0' if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/renesas/ra6m4-cpk/SConscript b/bsp/renesas/ra6m4-cpk/SConscript index 6a57c550af..aee8a3bb36 100644 --- a/bsp/renesas/ra6m4-cpk/SConscript +++ b/bsp/renesas/ra6m4-cpk/SConscript @@ -10,12 +10,9 @@ CPPPATH = [] list = os.listdir(cwd) if rtconfig.PLATFORM in ['iccarm']: - print("\nThe current project does not support iar build\n") + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM in ['gcc']: - CPPPATH = [cwd] - src = Glob('./src/*.c') -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': CPPPATH = [cwd] src = Glob('./src/*.c') diff --git a/bsp/renesas/ra6m4-cpk/board/ports/SConscript b/bsp/renesas/ra6m4-cpk/board/ports/SConscript index 6df0a4f30f..4871d7248b 100644 --- a/bsp/renesas/ra6m4-cpk/board/ports/SConscript +++ b/bsp/renesas/ra6m4-cpk/board/ports/SConscript @@ -12,9 +12,9 @@ if GetDepend(['BSP_USING_RW007']): CPPPATH = [cwd] LOCAL_CFLAGS = '' -if rtconfig.PLATFORM in ['gcc'] or rtconfig.PLATFORM == 'armclang': +if rtconfig.PLATFORM in ['gcc', 'armclang']: LOCAL_CFLAGS += ' -std=c99' -elif rtconfig.PLATFORM == 'armcc': +elif rtconfig.PLATFORM in ['armcc']: LOCAL_CFLAGS += ' --c99' group = DefineGroup('Drivers', src, depend = [], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS) diff --git a/bsp/renesas/ra6m4-cpk/ra/SConscript b/bsp/renesas/ra6m4-cpk/ra/SConscript index ec190608c8..1057357156 100644 --- a/bsp/renesas/ra6m4-cpk/ra/SConscript +++ b/bsp/renesas/ra6m4-cpk/ra/SConscript @@ -8,18 +8,9 @@ group = [] CPPPATH = [] if rtconfig.PLATFORM in ['iccarm']: - print("\nThe current project does not support iar build\n") + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM in ['gcc']: - src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c') - src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c'] - src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/startup.c'] - src += Glob(cwd + '/fsp/src/r_*/*.c') - CPPPATH = [ cwd + '/arm/CMSIS_5/CMSIS/Core/Include', - cwd + '/fsp/inc', - cwd + '/fsp/inc/api', - cwd + '/fsp/inc/instances',] -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c') src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c'] diff --git a/bsp/renesas/ra6m4-cpk/ra_cfg/SConscript b/bsp/renesas/ra6m4-cpk/ra_cfg/SConscript index 698fd28ee0..016653baf0 100644 --- a/bsp/renesas/ra6m4-cpk/ra_cfg/SConscript +++ b/bsp/renesas/ra6m4-cpk/ra_cfg/SConscript @@ -8,13 +8,10 @@ group = [] CPPPATH = [] if rtconfig.PLATFORM in ['iccarm']: - print("\nThe current project does not support iar build\n") + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM in ['gcc']: - src = Glob('*.c') - CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp'] -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': src = Glob('*.c') CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp'] diff --git a/bsp/renesas/ra6m4-cpk/ra_gen/SConscript b/bsp/renesas/ra6m4-cpk/ra_gen/SConscript index 9f35703f50..09be271571 100644 --- a/bsp/renesas/ra6m4-cpk/ra_gen/SConscript +++ b/bsp/renesas/ra6m4-cpk/ra_gen/SConscript @@ -8,12 +8,9 @@ group = [] CPPPATH = [] if rtconfig.PLATFORM in ['iccarm']: - print("\nThe current project does not support iar build\n") + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM in ['gcc'] : - src = Glob('*.c') - CPPPATH = [cwd, ] -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': src = Glob('*.c') CPPPATH = [cwd, ] diff --git a/bsp/renesas/ra6m4-iot/SConscript b/bsp/renesas/ra6m4-iot/SConscript index f06753e844..aee8a3bb36 100644 --- a/bsp/renesas/ra6m4-iot/SConscript +++ b/bsp/renesas/ra6m4-iot/SConscript @@ -10,12 +10,9 @@ CPPPATH = [] list = os.listdir(cwd) if rtconfig.PLATFORM in ['iccarm']: - print("\nThe current project does not support iar build\n") + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM in ['gcc'] : - CPPPATH = [cwd] - src = Glob('./src/*.c') -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': CPPPATH = [cwd] src = Glob('./src/*.c') diff --git a/bsp/renesas/ra6m4-iot/board/ports/SConscript b/bsp/renesas/ra6m4-iot/board/ports/SConscript index 6df0a4f30f..4871d7248b 100644 --- a/bsp/renesas/ra6m4-iot/board/ports/SConscript +++ b/bsp/renesas/ra6m4-iot/board/ports/SConscript @@ -12,9 +12,9 @@ if GetDepend(['BSP_USING_RW007']): CPPPATH = [cwd] LOCAL_CFLAGS = '' -if rtconfig.PLATFORM in ['gcc'] or rtconfig.PLATFORM == 'armclang': +if rtconfig.PLATFORM in ['gcc', 'armclang']: LOCAL_CFLAGS += ' -std=c99' -elif rtconfig.PLATFORM == 'armcc': +elif rtconfig.PLATFORM in ['armcc']: LOCAL_CFLAGS += ' --c99' group = DefineGroup('Drivers', src, depend = [], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS) diff --git a/bsp/renesas/ra6m4-iot/ra/SConscript b/bsp/renesas/ra6m4-iot/ra/SConscript index 346f20faf7..1057357156 100644 --- a/bsp/renesas/ra6m4-iot/ra/SConscript +++ b/bsp/renesas/ra6m4-iot/ra/SConscript @@ -8,18 +8,9 @@ group = [] CPPPATH = [] if rtconfig.PLATFORM in ['iccarm']: - print("\nThe current project does not support iar build\n") + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM in ['gcc'] : - src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c') - src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c'] - src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/startup.c'] - src += Glob(cwd + '/fsp/src/r_*/*.c') - CPPPATH = [ cwd + '/arm/CMSIS_5/CMSIS/Core/Include', - cwd + '/fsp/inc', - cwd + '/fsp/inc/api', - cwd + '/fsp/inc/instances',] -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c') src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c'] diff --git a/bsp/renesas/ra6m4-iot/ra_cfg/SConscript b/bsp/renesas/ra6m4-iot/ra_cfg/SConscript index d4a8e56397..21af4711c5 100644 --- a/bsp/renesas/ra6m4-iot/ra_cfg/SConscript +++ b/bsp/renesas/ra6m4-iot/ra_cfg/SConscript @@ -8,12 +8,9 @@ group = [] CPPPATH = [] if rtconfig.PLATFORM in ['iccarm']: - print("\nThe current project does not support iar build\n") + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM in ['gcc'] : - src = Glob('*.c') - CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp'] -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': src = Glob('*.c') CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp'] diff --git a/bsp/renesas/ra6m4-iot/ra_gen/SConscript b/bsp/renesas/ra6m4-iot/ra_gen/SConscript index 9f35703f50..09be271571 100644 --- a/bsp/renesas/ra6m4-iot/ra_gen/SConscript +++ b/bsp/renesas/ra6m4-iot/ra_gen/SConscript @@ -8,12 +8,9 @@ group = [] CPPPATH = [] if rtconfig.PLATFORM in ['iccarm']: - print("\nThe current project does not support iar build\n") + print("\nThe current project does not support IAR build\n") Return('group') -elif rtconfig.PLATFORM in ['gcc'] : - src = Glob('*.c') - CPPPATH = [cwd, ] -elif rtconfig.PLATFORM == 'armclang': +elif rtconfig.PLATFORM in ['gcc', 'armclang']: if GetOption('target') != 'mdk5': src = Glob('*.c') CPPPATH = [cwd, ] diff --git a/bsp/rockchip/rk2108/driver/SConscript b/bsp/rockchip/rk2108/driver/SConscript index a29d4f6e2c..3fb89ecdd3 100644 --- a/bsp/rockchip/rk2108/driver/SConscript +++ b/bsp/rockchip/rk2108/driver/SConscript @@ -6,11 +6,11 @@ cwd = GetCurrentDir() src = Glob('*.c') + Glob('*.cpp') CPPPATH = [cwd, str(Dir('#'))] -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += Glob(RTT_ROOT + '/bsp/rockchip/common/drivers/drv_cache_gcc.S') -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += Glob(RTT_ROOT + '/bsp/rockchip/common/drivers/drv_cache_arm.s') -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += Glob(RTT_ROOT + '/bsp/rockchip/common/drivers/drv_cache_iar.s') group = DefineGroup('driver', src, depend = [''], CPPPATH = CPPPATH) diff --git a/bsp/stm32/stm32f103-100ask-mini/SConstruct b/bsp/stm32/stm32f103-100ask-mini/SConstruct index e636260b5a..870efaf708 100644 --- a/bsp/stm32/stm32f103-100ask-mini/SConstruct +++ b/bsp/stm32/stm32f103-100ask-mini/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') diff --git a/bsp/stm32/stm32f103-100ask-mini/board/SConscript b/bsp/stm32/stm32f103-100ask-mini/board/SConscript index e88733e3f9..53480c712e 100644 --- a/bsp/stm32/stm32f103-100ask-mini/board/SConscript +++ b/bsp/stm32/stm32f103-100ask-mini/board/SConscript @@ -21,11 +21,11 @@ path += [cwd + '/ports'] startup_path_prefix = SDK_LIB -if rtconfig.PLATFORM == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xb.s'] elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/arm/startup_stm32f103xb.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xb.s'] # STM32F100xB || STM32F100xE || STM32F101x6 diff --git a/bsp/stm32/stm32f103-100ask-mini/rtconfig.py b/bsp/stm32/stm32f103-100ask-mini/rtconfig.py index b6a7baf736..afe3d54b16 100644 --- a/bsp/stm32/stm32f103-100ask-mini/rtconfig.py +++ b/bsp/stm32/stm32f103-100ask-mini/rtconfig.py @@ -22,7 +22,7 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' + PLATFORM = 'iccarm' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.2' if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/stm32/stm32f103-100ask-pro/SConstruct b/bsp/stm32/stm32f103-100ask-pro/SConstruct index e636260b5a..870efaf708 100644 --- a/bsp/stm32/stm32f103-100ask-pro/SConstruct +++ b/bsp/stm32/stm32f103-100ask-pro/SConstruct @@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'], LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) -if rtconfig.PLATFORM == 'iar': +if rtconfig.PLATFORM in ['iccarm']: env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(ARFLAGS = ['']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') diff --git a/bsp/stm32/stm32f103-100ask-pro/board/SConscript b/bsp/stm32/stm32f103-100ask-pro/board/SConscript index 107ebd896e..8da0399bb1 100644 --- a/bsp/stm32/stm32f103-100ask-pro/board/SConscript +++ b/bsp/stm32/stm32f103-100ask-pro/board/SConscript @@ -21,11 +21,11 @@ path += [cwd + '/ports'] startup_path_prefix = SDK_LIB -if rtconfig.PLATFORM == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xe.s'] elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/arm/startup_stm32f103xe.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s'] # STM32F100xB || STM32F100xE || STM32F101x6 diff --git a/bsp/stm32/stm32f103-100ask-pro/rtconfig.py b/bsp/stm32/stm32f103-100ask-pro/rtconfig.py index b6a7baf736..afe3d54b16 100644 --- a/bsp/stm32/stm32f103-100ask-pro/rtconfig.py +++ b/bsp/stm32/stm32f103-100ask-pro/rtconfig.py @@ -22,7 +22,7 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armcc' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' + PLATFORM = 'iccarm' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.2' if os.getenv('RTT_EXEC_PATH'): diff --git a/bsp/stm32/stm32l475-atk-pandora/board/ports/fal/SConscript b/bsp/stm32/stm32l475-atk-pandora/board/ports/fal/SConscript index 3e6b2995f2..cee47c2d7e 100644 --- a/bsp/stm32/stm32l475-atk-pandora/board/ports/fal/SConscript +++ b/bsp/stm32/stm32l475-atk-pandora/board/ports/fal/SConscript @@ -10,12 +10,10 @@ src += Glob('*.c') CPPPATH = [cwd] LOCAL_CFLAGS = '' -if rtconfig.PLATFORM in ['gcc']: +if rtconfig.PLATFORM in ['gcc', 'armclang']: LOCAL_CFLAGS += ' -std=c99' -elif rtconfig.PLATFORM == 'armcc': +elif rtconfig.PLATFORM in ['armcc']: LOCAL_CFLAGS += ' --c99' -elif rtconfig.PLATFORM == 'armclang': - LOCAL_CFLAGS += ' -std=c99' group = DefineGroup('FAL', src, depend = ['RT_USING_FAL'], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS) diff --git a/bsp/swm341/libraries/SConscript b/bsp/swm341/libraries/SConscript index 2e56b298a6..53e7362918 100644 --- a/bsp/swm341/libraries/SConscript +++ b/bsp/swm341/libraries/SConscript @@ -6,11 +6,11 @@ CPPPATH = [cwd + '/CMSIS/CoreSupport', cwd + '/CMSIS/DeviceSupport', cwd + '/SWM src += Glob('SWM341_StdPeriph_Driver/*.c') -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += ['CMSIS/DeviceSupport/startup/gcc/startup_SWM341.s'] -elif rtconfig.CROSS_TOOL == 'keil': +elif rtconfig.PLATFORM in ['armcc', 'armclang']: src += ['CMSIS/DeviceSupport/startup/arm/startup_SWM341.s'] -elif rtconfig.CROSS_TOOL == 'iar': +elif rtconfig.PLATFORM in ['iccarm']: src += ['CMSIS/DeviceSupport/startup/iar/startup_SWM341.s'] group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH) diff --git a/bsp/swm341/rtconfig.py b/bsp/swm341/rtconfig.py index ba869870a9..7208ef42c3 100644 --- a/bsp/swm341/rtconfig.py +++ b/bsp/swm341/rtconfig.py @@ -19,8 +19,8 @@ elif CROSS_TOOL == 'keil': PLATFORM = 'armclang' EXEC_PATH = r'C:/Keil_v5' elif CROSS_TOOL == 'iar': - PLATFORM = 'iar' - EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' + PLATFORM = 'iccarm' + EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') diff --git a/components/drivers/spi/SConscript b/components/drivers/spi/SConscript index 8fe82b73e4..27b7a8dd71 100644 --- a/components/drivers/spi/SConscript +++ b/components/drivers/spi/SConscript @@ -29,12 +29,10 @@ if GetDepend('RT_USING_SFUD'): if GetDepend('RT_SFUD_USING_SFDP'): src_device += ['sfud/src/sfud_sfdp.c'] - if rtconfig.PLATFORM in ['gcc']: + if rtconfig.PLATFORM in ['gcc', 'armclang']: LOCAL_CFLAGS += ' -std=c99' - elif rtconfig.PLATFORM == 'armcc': + elif rtconfig.PLATFORM in ['armcc']: LOCAL_CFLAGS += ' --c99' - elif rtconfig.PLATFORM == 'armclang': - LOCAL_CFLAGS += ' -std=c99' src += src_device diff --git a/components/libc/cplusplus/SConscript b/components/libc/cplusplus/SConscript index 82983fa667..1c764ea3e3 100644 --- a/components/libc/cplusplus/SConscript +++ b/components/libc/cplusplus/SConscript @@ -5,18 +5,16 @@ Import('rtconfig') cwd = GetCurrentDir() src = Glob('*.cpp') + Glob('*.c') +CPPPATH = [cwd] if GetDepend('RT_USING_CPLUSPLUS11'): src += Glob('cpp11/*.cpp') + Glob('cpp11/*.c') - -CPPPATH = [cwd] - -if rtconfig.PLATFORM == 'armclang' and GetDepend('RT_USING_CPLUSPLUS11'): - src += Glob('cpp11/armclang/*.cpp') + Glob('cpp11/armclang/*.c') - CPPPATH += [cwd + '/cpp11/armclang'] -elif rtconfig.PLATFORM in ['gcc'] and GetDepend('RT_USING_CPLUSPLUS11'): - src += Glob('cpp11/gcc/*.cpp') + Glob('cpp11/gcc/*.c') - CPPPATH += [cwd + '/cpp11/gcc'] + if rtconfig.PLATFORM in ['armclang']: + src += Glob('cpp11/armclang/*.cpp') + Glob('cpp11/armclang/*.c') + CPPPATH += [cwd + '/cpp11/armclang'] + elif rtconfig.PLATFORM in ['gcc']: + src += Glob('cpp11/gcc/*.cpp') + Glob('cpp11/gcc/*.c') + CPPPATH += [cwd + '/cpp11/gcc'] group = DefineGroup('CPlusPlus', src, depend = ['RT_USING_CPLUSPLUS'], CPPPATH = CPPPATH) diff --git a/documentation/scons/scons.md b/documentation/scons/scons.md index 51597485b9..d3956d67cc 100644 --- a/documentation/scons/scons.md +++ b/documentation/scons/scons.md @@ -245,7 +245,7 @@ if GetDepend(['RT_USING_USB_DEVICE']): if GetDepend(['RT_USING_SDCARD']): src += ['drv_sdcard.c'] -if rtconfig.PLATFORM == 'gcc': +if rtconfig.PLATFORM in ['gcc']: src += ['gcc_startup.s'] CPPPATH = [cwd] diff --git a/tools/building.py b/tools/building.py index 5526b84e05..91c6d05c99 100644 --- a/tools/building.py +++ b/tools/building.py @@ -124,7 +124,7 @@ class Win32Spawn: # generate cconfig.h file def GenCconfigFile(env, BuildOptions): - if rtconfig.PLATFORM == 'gcc': + if rtconfig.PLATFORM in ['gcc']: contents = '' if not os.path.isfile('cconfig.h'): import gcc @@ -287,7 +287,7 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ GenCconfigFile(env, BuildOptions) # auto append '_REENT_SMALL' when using newlib 'nano.specs' option - if rtconfig.PLATFORM == 'gcc' and str(env['LINKFLAGS']).find('nano.specs') != -1: + if rtconfig.PLATFORM in ['gcc'] and str(env['LINKFLAGS']).find('nano.specs') != -1: env.AppendUnique(CPPDEFINES = ['_REENT_SMALL']) if GetOption('genconfig'): @@ -618,7 +618,7 @@ def DefineGroup(name, src, depend, **parameters): group['LOCAL_CPPPATH'] = paths - if rtconfig.PLATFORM == 'gcc': + if rtconfig.PLATFORM in ['gcc']: if 'CFLAGS' in group: group['CFLAGS'] = utils.GCCC99Patch(group['CFLAGS']) if 'CCFLAGS' in group: @@ -695,9 +695,9 @@ def PreBuilding(): def GroupLibName(name, env): - if rtconfig.PLATFORM == 'armcc': + if rtconfig.PLATFORM in ['armcc']: return name + '_rvds' - elif rtconfig.PLATFORM == 'gcc': + elif rtconfig.PLATFORM in ['gcc']: return name + '_gcc' return name diff --git a/tools/cmake.py b/tools/cmake.py index 2129c2d612..d938f9c787 100644 --- a/tools/cmake.py +++ b/tools/cmake.py @@ -25,7 +25,7 @@ def GenerateCFiles(env,project): AS = os.path.join(rtconfig.EXEC_PATH, rtconfig.AS).replace('\\', "/") AR = os.path.join(rtconfig.EXEC_PATH, rtconfig.AR).replace('\\', "/") LINK = os.path.join(rtconfig.EXEC_PATH, rtconfig.LINK).replace('\\', "/") - if rtconfig.PLATFORM == 'gcc': + if rtconfig.PLATFORM in ['gcc']: SIZE = os.path.join(rtconfig.EXEC_PATH, rtconfig.SIZE).replace('\\', "/") OBJDUMP = os.path.join(rtconfig.EXEC_PATH, rtconfig.OBJDUMP).replace('\\', "/") OBJCOPY = os.path.join(rtconfig.EXEC_PATH, rtconfig.OBJCPY).replace('\\', "/") @@ -47,7 +47,7 @@ def GenerateCFiles(env,project): AS += ".exe" AR += ".exe" LINK += ".exe" - if rtconfig.PLATFORM == 'gcc': + if rtconfig.PLATFORM in ['gcc']: SIZE += ".exe" OBJDUMP += ".exe" OBJCOPY += ".exe" @@ -78,7 +78,7 @@ def GenerateCFiles(env,project): cm_file.write("SET(CMAKE_CXX_FLAGS \""+ CXXFLAGS + "\")\n") cm_file.write("SET(CMAKE_CXX_COMPILER_WORKS TRUE)\n\n") - if rtconfig.PLATFORM == 'gcc': + if rtconfig.PLATFORM in ['gcc']: cm_file.write("SET(CMAKE_OBJCOPY \""+ OBJCOPY + "\")\n") cm_file.write("SET(CMAKE_SIZE \""+ SIZE + "\")\n\n") elif rtconfig.PLATFORM in ['armcc', 'armclang']: @@ -86,7 +86,7 @@ def GenerateCFiles(env,project): LINKER_FLAGS = '' LINKER_LIBS = '' - if rtconfig.PLATFORM == 'gcc': + if rtconfig.PLATFORM in ['gcc']: LINKER_FLAGS += '-T' elif rtconfig.PLATFORM in ['armcc', 'armclang']: LINKER_FLAGS += '--scatter' @@ -126,7 +126,7 @@ def GenerateCFiles(env,project): cm_file.write( "\t" + path.replace("\\", "/") + "\n" ) cm_file.write(")\n\n") - if rtconfig.PLATFORM == 'gcc': + if rtconfig.PLATFORM in ['gcc']: cm_file.write("LINK_DIRECTORIES(\n") for group in project: if 'LIBPATH' in group.keys():