[gcc][armcc][armclang] rtconfig.CROSS_TOOL->rtconfig.PLATFORM

This commit is contained in:
Meco Man 2022-08-15 10:32:27 -04:00 committed by guo
parent c038e55d32
commit dd94198bd6
100 changed files with 202 additions and 287 deletions

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -15,13 +15,13 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/APM32F4xx_Library/Device/Geehy/APM32F4xx/Source/gcc/startup_apm32f40x.s']
# You can select chips from the list above # You can select chips from the list above

View File

@ -17,9 +17,9 @@ path += [cwd + '/inc']
startup_path_prefix = SDK_LIB 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'] 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'] src += [startup_path_prefix + '/AT32F413_Firmware_Library/cmsis/cm4/device_support/startup/mdk/startup_at32f413.s']
elif rtconfig.PLATFORM in ['iccarm']: elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/AT32F413_Firmware_Library/cmsis/cm4/device_support/startup/iar/startup_at32f413.s'] src += [startup_path_prefix + '/AT32F413_Firmware_Library/cmsis/cm4/device_support/startup/iar/startup_at32f413.s']

View File

@ -17,9 +17,9 @@ path += [cwd + '/inc']
startup_path_prefix = SDK_LIB 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'] 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'] src += [startup_path_prefix + '/AT32F415_Firmware_Library/cmsis/cm4/device_support/startup/mdk/startup_at32f415.s']
elif rtconfig.PLATFORM in ['iccarm']: elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/AT32F415_Firmware_Library/cmsis/cm4/device_support/startup/iar/startup_at32f415.s'] src += [startup_path_prefix + '/AT32F415_Firmware_Library/cmsis/cm4/device_support/startup/iar/startup_at32f415.s']

View File

@ -15,10 +15,7 @@ if rtconfig.PLATFORM in ['gcc']:
if rtconfig.PLATFORM in ['iccarm']: if rtconfig.PLATFORM in ['iccarm']:
src = Glob('*.c') + Glob('*_iar.S') src = Glob('*.c') + Glob('*_iar.S')
if rtconfig.PLATFORM == 'cl': if rtconfig.PLATFORM in ['cl', 'mingw']:
src = Glob('*.c')
if rtconfig.PLATFORM == 'mingw':
src = Glob('*.c') src = Glob('*.c')
group = DefineGroup('Platform', src, depend = [''], CPPPATH = CPPPATH) group = DefineGroup('Platform', src, depend = [''], CPPPATH = CPPPATH)

View File

@ -15,10 +15,7 @@ if rtconfig.PLATFORM in ['gcc']:
if rtconfig.PLATFORM in ['iccarm']: if rtconfig.PLATFORM in ['iccarm']:
src = Glob('*.c') + Glob('*_iar.S') src = Glob('*.c') + Glob('*_iar.S')
if rtconfig.PLATFORM == 'cl': if rtconfig.PLATFORM in ['cl', 'mingw']:
src = Glob('*.c')
if rtconfig.PLATFORM == 'mingw':
src = Glob('*.c') src = Glob('*.c')
group = DefineGroup('Platform', src, depend = [''], CPPPATH = CPPPATH) group = DefineGroup('Platform', src, depend = [''], CPPPATH = CPPPATH)

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')

View File

@ -27,7 +27,7 @@ path += [cwd + '/ports']
startup_path_prefix = SDK_LIB startup_path_prefix = SDK_LIB
if rtconfig.PLATFORM == 'gcc': if rtconfig.PLATFORM in ['gcc']:
src += [startup_path_prefix + src += [startup_path_prefix +
'/IFX_PSOC6_HAL/TARGET_CY8CKIT-062S2-43012/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/startup_psoc6_02_cm4.S'] '/IFX_PSOC6_HAL/TARGET_CY8CKIT-062S2-43012/COMPONENT_CM4/TOOLCHAIN_GCC_ARM/startup_psoc6_02_cm4.S']
src += [startup_path_prefix + src += [startup_path_prefix +

View File

@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armclang' PLATFORM = 'armclang'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -99,7 +99,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')
@ -620,11 +620,11 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/IAR/startup_gd32f4xx.s']
CPPDEFINES = ['GD32F407'] CPPDEFINES = ['GD32F407']

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -15,11 +15,11 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/IAR/startup_gd32f10x_hd.s']
CPPDEFINES = ['GD32F10X_HD'] CPPDEFINES = ['GD32F10X_HD']

View File

@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -15,11 +15,11 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/IAR/startup_gd32f10x_cl.s']
CPPDEFINES = ['GD32F10X_CL'] CPPDEFINES = ['GD32F10X_CL']

View File

@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -15,11 +15,11 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/IAR/startup_gd32f10x_cl.s']
CPPDEFINES = ['GD32F10X_CL'] CPPDEFINES = ['GD32F10X_CL']

View File

@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -15,11 +15,11 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/GD32F10x_Firmware_Library/CMSIS/GD/GD32F10x/Source/IAR/startup_gd32f10x_cl.s']
CPPDEFINES = ['GD32F10X_CL'] CPPDEFINES = ['GD32F10X_CL']

View File

@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -15,11 +15,11 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/IAR/startup_gd32f20x_cl.s']
CPPDEFINES = ['GD32F20X_CL'] CPPDEFINES = ['GD32F20X_CL']

View File

@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -15,11 +15,11 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/GD32F20x_Firmware_Library/CMSIS/GD/GD32F20x/Source/IAR/startup_gd32f20x_cl.s']
CPPDEFINES = ['GD32F20X_CL'] CPPDEFINES = ['GD32F20X_CL']

View File

@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -15,11 +15,11 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/IAR/startup_gd32f30x_hd.s']
CPPDEFINES = ['GD32F30X_HD'] CPPDEFINES = ['GD32F30X_HD']

View File

@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -15,11 +15,11 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/IAR/startup_gd32f30x_cl.s']
CPPDEFINES = ['GD32F30X_CL'] CPPDEFINES = ['GD32F30X_CL']

View File

@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -15,11 +15,11 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/GD32F30x_Firmware_Library/CMSIS/GD/GD32F30x/Source/IAR/startup_gd32f30x_cl.s']
CPPDEFINES = ['GD32F30X_CL'] CPPDEFINES = ['GD32F30X_CL']

View File

@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -15,11 +15,11 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/IAR/startup_gd32f4xx.s']
CPPDEFINES = ['GD32F407'] CPPDEFINES = ['GD32F407']

View File

@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -15,11 +15,11 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/GD32F4xx_Firmware_Library/CMSIS/GD/GD32F4xx/Source/IAR/startup_gd32f4xx.s']
CPPDEFINES = ['GD32F450'] CPPDEFINES = ['GD32F450']

View File

@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -416,7 +416,7 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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/start.S']
src += [startup_path_prefix + '/GD32VF103_Firmware_Library/RISCV/env_Eclipse/entry.S'] src += [startup_path_prefix + '/GD32VF103_Firmware_Library/RISCV/env_Eclipse/entry.S']

View File

@ -15,7 +15,7 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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/start.S']
src += [startup_path_prefix + '/GD32VF103_Firmware_Library/RISCV/env_Eclipse/entry.S'] src += [startup_path_prefix + '/GD32VF103_Firmware_Library/RISCV/env_Eclipse/entry.S']

View File

@ -15,7 +15,7 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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/start.S']
src += [startup_path_prefix + '/GD32VF103_Firmware_Library/RISCV/env_Eclipse/entry.S'] src += [startup_path_prefix + '/GD32VF103_Firmware_Library/RISCV/env_Eclipse/entry.S']

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -18,11 +18,11 @@ path += [cwd + '/config']
startup_path_prefix = SDK_LIB 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'] 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'] 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'] src += [startup_path_prefix + '/hc32f460_ddl/drivers/cmsis/Device/HDSC/hc32f4xx/Source/IAR/startup_hc32f460.s']
CPPDEFINES = ['HC32F460'] CPPDEFINES = ['HC32F460']

View File

@ -22,7 +22,7 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.4' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.4'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):

View File

@ -21,9 +21,9 @@ path += [cwd + '/config']
startup_path_prefix = SDK_LIB 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'] 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'] src += [startup_path_prefix + '/hc32f4a0_ddl/drivers/cmsis/Device/HDSC/hc32f4xx/Source/ARM/startup_hc32f4a0.s']
elif rtconfig.PLATFORM in ['iccarm']: elif rtconfig.PLATFORM in ['iccarm']:
src += [startup_path_prefix + '/hc32f4a0_ddl/drivers/cmsis/Device/HDSC/hc32f4xx/Source/IAR/startup_hc32f4a0.s'] src += [startup_path_prefix + '/hc32f4a0_ddl/drivers/cmsis/Device/HDSC/hc32f4xx/Source/IAR/startup_hc32f4a0.s']

View File

@ -7,7 +7,7 @@ src = Glob('*.c')
CPPPATH = [cwd] CPPPATH = [cwd]
# add for startup script # add for startup script
if rtconfig.CROSS_TOOL == 'gcc': if rtconfig.PLATFORM in ['gcc']:
CPPDEFINES = ['__START=entry'] CPPDEFINES = ['__START=entry']
else: else:
CPPDEFINES = [] CPPDEFINES = []

View File

@ -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'] 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') CPPDEFINES.append('__FPU_PRESENT=1')
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES) group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES)

View File

@ -7,7 +7,7 @@ if GetDepend('BSP_USING_QSPIFLASH'):
src = Glob('*.c') src = Glob('*.c')
CPPPATH = [cwd] CPPPATH = [cwd]
if rtconfig.CROSS_TOOL == 'keil': if rtconfig.PLATFORM in ['armcc', 'armclang']:
LINKFLAGS = '--keep=*(.boot_hdr.ivt)' LINKFLAGS = '--keep=*(.boot_hdr.ivt)'
LINKFLAGS += '--keep=*(.boot_hdr.boot_data)' LINKFLAGS += '--keep=*(.boot_hdr.boot_data)'
LINKFLAGS += '--keep=*(.boot_hdr.dcd_data)' LINKFLAGS += '--keep=*(.boot_hdr.dcd_data)'

View File

@ -7,7 +7,7 @@ src = Glob('*.c')
CPPPATH = [cwd] CPPPATH = [cwd]
# add for startup script # add for startup script
if rtconfig.CROSS_TOOL == 'gcc': if rtconfig.PLATFORM in ['gcc']:
CPPDEFINES = ['__START=entry'] CPPDEFINES = ['__START=entry']
else: else:
CPPDEFINES = [] CPPDEFINES = []

View File

@ -7,7 +7,7 @@ if GetDepend('BSP_USING_QSPIFLASH'):
src = Glob('*.c') src = Glob('*.c')
CPPPATH = [cwd] CPPPATH = [cwd]
if rtconfig.CROSS_TOOL == 'keil': if rtconfig.PLATFORM in ['armcc', 'armclang']:
LINKFLAGS = ' --keep=*(.boot_hdr.ivt)' LINKFLAGS = ' --keep=*(.boot_hdr.ivt)'
LINKFLAGS += ' --keep=*(.boot_hdr.boot_data)' LINKFLAGS += ' --keep=*(.boot_hdr.boot_data)'
LINKFLAGS += ' --keep=*(.boot_hdr.dcd_data)' LINKFLAGS += ' --keep=*(.boot_hdr.dcd_data)'

View File

@ -10,9 +10,9 @@ src = Split('''
MIMXRT1021/drivers/fsl_cache.c MIMXRT1021/drivers/fsl_cache.c
''') ''')
if rtconfig.CROSS_TOOL == 'gcc': if rtconfig.PLATFORM in ['gcc']:
src += ['MIMXRT1021/gcc/startup_MIMXRT1021.S'] src += ['MIMXRT1021/gcc/startup_MIMXRT1021.S']
elif rtconfig.CROSS_TOOL == 'keil': elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += ['MIMXRT1021/arm/startup_MIMXRT1021.s'] src += ['MIMXRT1021/arm/startup_MIMXRT1021.s']
elif rtconfig.PLATFORM in ['iccarm']: elif rtconfig.PLATFORM in ['iccarm']:
src += ['MIMXRT1021/iar/startup_MIMXRT1021.s'] src += ['MIMXRT1021/iar/startup_MIMXRT1021.s']

View File

@ -14,9 +14,9 @@ src = Split('''
MIMXRT1176/drivers/cm7/fsl_cache.c MIMXRT1176/drivers/cm7/fsl_cache.c
''') ''')
if rtconfig.CROSS_TOOL == 'gcc': if rtconfig.PLATFORM in ['gcc']:
src += ['MIMXRT1176/gcc/startup_MIMXRT1176_cm7.S'] 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'] src += ['MIMXRT1176/arm/startup_MIMXRT1176_cm7.s']
elif rtconfig.PLATFORM in ['iccarm']: elif rtconfig.PLATFORM in ['iccarm']:
src += ['MIMXRT1176/iar/startup_MIMXRT1176_cm7.s'] src += ['MIMXRT1176/iar/startup_MIMXRT1176_cm7.s']
@ -43,7 +43,7 @@ if GetDepend(['BSP_USING_SDIO']):
if GetDepend(['BSP_USING_SDRAM']): if GetDepend(['BSP_USING_SDRAM']):
src += ['MIMXRT1176/drivers/fsl_semc.c'] 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') group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, ASFLAGS = '$ASFLAGS -D __STARTUP_CLEAR_BSS')
else: else:
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path) group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path)

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map')

View File

@ -15,11 +15,11 @@ path = [cwd]
startup_path_prefix = SDK_LIB 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'] src += [startup_path_prefix + '/N32G45x_Firmware_Library/CMSIS/device/startup/startup_n32g45x_gcc.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']: elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/N32G45x_Firmware_Library/CMSIS/device/startup/startup_n32g45x.s'] 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'] src += [startup_path_prefix + '/N32G45x_Firmware_Library/CMSIS/device/startup/startup_n32g45x_EWARM.s']
CPPDEFINES = ['N32G45X'] CPPDEFINES = ['N32G45X']

View File

@ -22,8 +22,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -47,13 +47,13 @@ elif GetDepend('SOC_NRF51822') == True:
define += ['NRF51822_XXAA'] define += ['NRF51822_XXAA']
src += ['./mdk/system_nrf51.c'] src += ['./mdk/system_nrf51.c']
if rtconfig.PLATFORM == 'armcc': if rtconfig.PLATFORM in ['armcc']:
src += ['./mdk/arm_startup_nrf51.s'] src += ['./mdk/arm_startup_nrf51.s']
if rtconfig.PLATFORM == 'gcc': if rtconfig.PLATFORM in ['gcc']:
src += ['./mdk/gcc_startup_nrf51.S'] src += ['./mdk/gcc_startup_nrf51.S']
if rtconfig.PLATFORM == 'iccarm': if rtconfig.PLATFORM in ['iccarm']:
D_SRC += ['./mdk/iar_startup_nrf51.s'] D_SRC += ['./mdk/iar_startup_nrf51.s']
``` ```

View File

@ -10,12 +10,9 @@ CPPPATH = []
list = os.listdir(cwd) list = os.listdir(cwd)
if rtconfig.PLATFORM in ['iccarm']: 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') Return('group')
elif rtconfig.PLATFORM in ['gcc']: elif rtconfig.PLATFORM in ['gcc', 'armclang']:
CPPPATH = [cwd]
src = Glob('./src/*.c')
elif rtconfig.PLATFORM == 'armclang':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
CPPPATH = [cwd] CPPPATH = [cwd]
src = Glob('./src/*.c') src = Glob('./src/*.c')

View File

@ -12,9 +12,9 @@ if GetDepend(['BSP_USING_RW007']):
CPPPATH = [cwd] CPPPATH = [cwd]
LOCAL_CFLAGS = '' LOCAL_CFLAGS = ''
if rtconfig.PLATFORM in ['gcc'] or rtconfig.PLATFORM == 'armclang': if rtconfig.PLATFORM in ['gcc', 'armclang']:
LOCAL_CFLAGS += ' -std=c99' LOCAL_CFLAGS += ' -std=c99'
elif rtconfig.PLATFORM == 'armcc': elif rtconfig.PLATFORM in ['armcc']:
LOCAL_CFLAGS += ' --c99' LOCAL_CFLAGS += ' --c99'
group = DefineGroup('Drivers', src, depend = [], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS) group = DefineGroup('Drivers', src, depend = [], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS)

View File

@ -8,18 +8,9 @@ group = []
CPPPATH = [] CPPPATH = []
if rtconfig.PLATFORM in ['iccarm']: 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') Return('group')
elif rtconfig.PLATFORM in ['gcc']: elif rtconfig.PLATFORM in ['gcc', 'armclang']:
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':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c') 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/system.c']

View File

@ -8,12 +8,9 @@ group = []
CPPPATH = [] CPPPATH = []
if rtconfig.PLATFORM in ['iccarm']: 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') Return('group')
elif rtconfig.PLATFORM in ['gcc']: elif rtconfig.PLATFORM in ['gcc', 'armclang']:
src = Glob('*.c')
CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp']
elif rtconfig.PLATFORM == 'armclang':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
src = Glob('*.c') src = Glob('*.c')
CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp'] CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp']

View File

@ -8,12 +8,9 @@ group = []
CPPPATH = [] CPPPATH = []
if rtconfig.PLATFORM in ['iccarm']: 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') Return('group')
elif rtconfig.PLATFORM in ['gcc']: elif rtconfig.PLATFORM in ['gcc', 'armclang']:
src = Glob('*.c')
CPPPATH = [cwd, ]
elif rtconfig.PLATFORM == 'armclang':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
src = Glob('*.c') src = Glob('*.c')
CPPPATH = [cwd, ] CPPPATH = [cwd, ]

View File

@ -10,17 +10,13 @@ CPPPATH = []
file = glob.glob('*.tifcfg') file = glob.glob('*.tifcfg')
if len(file): if len(file):
if rtconfig.PLATFORM == 'iar': 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') Return('group')
elif rtconfig.PLATFORM == 'gcc': elif rtconfig.PLATFORM in ['gcc', 'armclang']:
src += ['qe_touch_config.c'] src += ['qe_touch_config.c']
src += ['qe_sample_rtthread.c'] src += ['qe_sample_rtthread.c']
CPPPATH = [cwd, ] CPPPATH = [cwd]
elif rtconfig.PLATFORM == 'armclang':
src += ['qe_touch_config.c']
src += ['qe_sample_rtthread.c']
CPPPATH = [cwd, ]
CPPDEFINES = ['QE_TOUCH_CONFIGURATION'] CPPDEFINES = ['QE_TOUCH_CONFIGURATION']
group = DefineGroup('QE-Touch', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) group = DefineGroup('QE-Touch', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)

View File

@ -9,13 +9,10 @@ src = []
CPPPATH = [] CPPPATH = []
list = os.listdir(cwd) list = os.listdir(cwd)
if rtconfig.PLATFORM == 'iar': 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') Return('group')
elif rtconfig.PLATFORM == 'gcc': elif rtconfig.PLATFORM in ['gcc', 'armclang']:
CPPPATH = [cwd + './src']
src = Glob('./src/*.c')
elif rtconfig.PLATFORM == 'armclang':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
CPPPATH = [cwd + './src'] CPPPATH = [cwd + './src']
src = Glob('./src/*.c') src = Glob('./src/*.c')

View File

@ -25,7 +25,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')

View File

@ -12,11 +12,11 @@ if GetDepend(['BSP_USING_RW007']):
CPPPATH = [cwd] CPPPATH = [cwd]
LOCAL_CCFLAGS = '' LOCAL_CCFLAGS = ''
if rtconfig.PLATFORM == 'gcc': if rtconfig.PLATFORM in ['gcc']:
LOCAL_CCFLAGS += ' -std=c99' LOCAL_CCFLAGS += ' -std=c99'
elif rtconfig.PLATFORM == 'armcc': elif rtconfig.PLATFORM in ['armcc']:
LOCAL_CCFLAGS += ' --c99' LOCAL_CCFLAGS += ' --c99'
elif rtconfig.PLATFORM == 'armclang': elif rtconfig.PLATFORM in ['armclang']:
LOCAL_CCFLAGS += ' -std=c99' LOCAL_CCFLAGS += ' -std=c99'
group = DefineGroup('Drivers', src, depend = [], CPPPATH = CPPPATH, LOCAL_CCFLAGS = LOCAL_CCFLAGS) group = DefineGroup('Drivers', src, depend = [], CPPPATH = CPPPATH, LOCAL_CCFLAGS = LOCAL_CCFLAGS)

View File

@ -7,19 +7,10 @@ src = []
group = [] group = []
CPPPATH = [] CPPPATH = []
if rtconfig.PLATFORM == 'iar': 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') Return('group')
elif rtconfig.PLATFORM == 'gcc': elif rtconfig.PLATFORM in ['gcc', 'armclang']:
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':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c') 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/system.c']

View File

@ -7,11 +7,11 @@ src = []
group = [] group = []
CPPPATH = [] CPPPATH = []
if rtconfig.PLATFORM == 'iar': 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') Return('group')
elif rtconfig.PLATFORM == 'gcc'or 'armclang': elif rtconfig.PLATFORM in ['gcc', 'armclang']:
src = Glob('*.c') src = Glob('*.c')
CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp'] CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp']

View File

@ -7,13 +7,10 @@ src = []
group = [] group = []
CPPPATH = [] CPPPATH = []
if rtconfig.PLATFORM == 'iar': 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') Return('group')
elif rtconfig.PLATFORM == 'gcc': elif rtconfig.PLATFORM in ['gcc', 'armclang']:
src = Glob('*.c')
CPPPATH = [cwd, ]
elif rtconfig.PLATFORM == 'armclang':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
src = Glob('*.c') src = Glob('*.c')
CPPPATH = [cwd, ] CPPPATH = [cwd, ]

View File

@ -20,7 +20,7 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armclang' PLATFORM = 'armclang'
EXEC_PATH = 'C:/Keil_v5' EXEC_PATH = 'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench 8.0'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):

View File

@ -10,12 +10,9 @@ CPPPATH = []
list = os.listdir(cwd) list = os.listdir(cwd)
if rtconfig.PLATFORM in ['iccarm']: 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') Return('group')
elif rtconfig.PLATFORM in ['gcc']: elif rtconfig.PLATFORM in ['gcc', 'armclang']:
CPPPATH = [cwd]
src = Glob('./src/*.c')
elif rtconfig.PLATFORM == 'armclang':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
CPPPATH = [cwd] CPPPATH = [cwd]
src = Glob('./src/*.c') src = Glob('./src/*.c')

View File

@ -12,9 +12,9 @@ if GetDepend(['BSP_USING_RW007']):
CPPPATH = [cwd] CPPPATH = [cwd]
LOCAL_CFLAGS = '' LOCAL_CFLAGS = ''
if rtconfig.PLATFORM in ['gcc'] or rtconfig.PLATFORM == 'armclang': if rtconfig.PLATFORM in ['gcc', 'armclang']:
LOCAL_CFLAGS += ' -std=c99' LOCAL_CFLAGS += ' -std=c99'
elif rtconfig.PLATFORM == 'armcc': elif rtconfig.PLATFORM in ['armcc']:
LOCAL_CFLAGS += ' --c99' LOCAL_CFLAGS += ' --c99'
group = DefineGroup('Drivers', src, depend = [], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS) group = DefineGroup('Drivers', src, depend = [], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS)

View File

@ -8,18 +8,9 @@ group = []
CPPPATH = [] CPPPATH = []
if rtconfig.PLATFORM in ['iccarm']: 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') Return('group')
elif rtconfig.PLATFORM in ['gcc']: elif rtconfig.PLATFORM in ['gcc', 'armclang']:
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':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c') 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/system.c']

View File

@ -8,13 +8,10 @@ group = []
CPPPATH = [] CPPPATH = []
if rtconfig.PLATFORM in ['iccarm']: 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') Return('group')
elif rtconfig.PLATFORM in ['gcc']: elif rtconfig.PLATFORM in ['gcc', 'armclang']:
src = Glob('*.c')
CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp']
elif rtconfig.PLATFORM == 'armclang':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
src = Glob('*.c') src = Glob('*.c')
CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp'] CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp']

View File

@ -8,12 +8,9 @@ group = []
CPPPATH = [] CPPPATH = []
if rtconfig.PLATFORM in ['iccarm']: 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') Return('group')
elif rtconfig.PLATFORM in ['gcc'] : elif rtconfig.PLATFORM in ['gcc', 'armclang']:
src = Glob('*.c')
CPPPATH = [cwd, ]
elif rtconfig.PLATFORM == 'armclang':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
src = Glob('*.c') src = Glob('*.c')
CPPPATH = [cwd, ] CPPPATH = [cwd, ]

View File

@ -10,12 +10,9 @@ CPPPATH = []
list = os.listdir(cwd) list = os.listdir(cwd)
if rtconfig.PLATFORM in ['iccarm']: 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') Return('group')
elif rtconfig.PLATFORM in ['gcc'] : elif rtconfig.PLATFORM in ['gcc', 'armclang']:
CPPPATH = [cwd]
src = Glob('./src/*.c')
elif rtconfig.PLATFORM == 'armclang':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
CPPPATH = [cwd] CPPPATH = [cwd]
src = Glob('./src/*.c') src = Glob('./src/*.c')

View File

@ -12,9 +12,9 @@ if GetDepend(['BSP_USING_RW007']):
CPPPATH = [cwd] CPPPATH = [cwd]
LOCAL_CFLAGS = '' LOCAL_CFLAGS = ''
if rtconfig.PLATFORM in ['gcc'] or rtconfig.PLATFORM == 'armclang': if rtconfig.PLATFORM in ['gcc', 'armclang']:
LOCAL_CFLAGS += ' -std=c99' LOCAL_CFLAGS += ' -std=c99'
elif rtconfig.PLATFORM == 'armcc': elif rtconfig.PLATFORM in ['armcc']:
LOCAL_CFLAGS += ' --c99' LOCAL_CFLAGS += ' --c99'
group = DefineGroup('Drivers', src, depend = [], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS) group = DefineGroup('Drivers', src, depend = [], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS)

View File

@ -8,18 +8,9 @@ group = []
CPPPATH = [] CPPPATH = []
if rtconfig.PLATFORM in ['iccarm']: 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') Return('group')
elif rtconfig.PLATFORM in ['gcc'] : elif rtconfig.PLATFORM in ['gcc', 'armclang']:
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':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c') 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/system.c']

View File

@ -8,12 +8,9 @@ group = []
CPPPATH = [] CPPPATH = []
if rtconfig.PLATFORM in ['iccarm']: 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') Return('group')
elif rtconfig.PLATFORM in ['gcc'] : elif rtconfig.PLATFORM in ['gcc', 'armclang']:
src = Glob('*.c')
CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp']
elif rtconfig.PLATFORM == 'armclang':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
src = Glob('*.c') src = Glob('*.c')
CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp'] CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp']

View File

@ -8,12 +8,9 @@ group = []
CPPPATH = [] CPPPATH = []
if rtconfig.PLATFORM in ['iccarm']: 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') Return('group')
elif rtconfig.PLATFORM in ['gcc'] : elif rtconfig.PLATFORM in ['gcc', 'armclang']:
src = Glob('*.c')
CPPPATH = [cwd, ]
elif rtconfig.PLATFORM == 'armclang':
if GetOption('target') != 'mdk5': if GetOption('target') != 'mdk5':
src = Glob('*.c') src = Glob('*.c')
CPPPATH = [cwd, ] CPPPATH = [cwd, ]

View File

@ -6,11 +6,11 @@ cwd = GetCurrentDir()
src = Glob('*.c') + Glob('*.cpp') src = Glob('*.c') + Glob('*.cpp')
CPPPATH = [cwd, str(Dir('#'))] 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') 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') 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') src += Glob(RTT_ROOT + '/bsp/rockchip/common/drivers/drv_cache_iar.s')
group = DefineGroup('driver', src, depend = [''], CPPPATH = CPPPATH) group = DefineGroup('driver', src, depend = [''], CPPPATH = CPPPATH)

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')

View File

@ -21,11 +21,11 @@ path += [cwd + '/ports']
startup_path_prefix = SDK_LIB 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'] src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xb.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']: elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/arm/startup_stm32f103xb.s'] 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'] src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xb.s']
# STM32F100xB || STM32F100xE || STM32F101x6 # STM32F100xB || STM32F100xE || STM32F101x6

View File

@ -22,7 +22,7 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.2' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.2'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):

View File

@ -26,7 +26,7 @@ env = Environment(tools = ['mingw'],
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH) 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(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')

View File

@ -21,11 +21,11 @@ path += [cwd + '/ports']
startup_path_prefix = SDK_LIB 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'] src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/startup_stm32f103xe.s']
elif rtconfig.PLATFORM in ['armcc', 'armclang']: elif rtconfig.PLATFORM in ['armcc', 'armclang']:
src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/arm/startup_stm32f103xe.s'] 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'] src += [startup_path_prefix + '/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Source/Templates/iar/startup_stm32f103xe.s']
# STM32F100xB || STM32F100xE || STM32F101x6 # STM32F100xB || STM32F100xE || STM32F101x6

View File

@ -22,7 +22,7 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.2' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.2'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):

View File

@ -10,12 +10,10 @@ src += Glob('*.c')
CPPPATH = [cwd] CPPPATH = [cwd]
LOCAL_CFLAGS = '' LOCAL_CFLAGS = ''
if rtconfig.PLATFORM in ['gcc']: if rtconfig.PLATFORM in ['gcc', 'armclang']:
LOCAL_CFLAGS += ' -std=c99' LOCAL_CFLAGS += ' -std=c99'
elif rtconfig.PLATFORM == 'armcc': elif rtconfig.PLATFORM in ['armcc']:
LOCAL_CFLAGS += ' --c99' 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) group = DefineGroup('FAL', src, depend = ['RT_USING_FAL'], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS)

View File

@ -6,11 +6,11 @@ CPPPATH = [cwd + '/CMSIS/CoreSupport', cwd + '/CMSIS/DeviceSupport', cwd + '/SWM
src += Glob('SWM341_StdPeriph_Driver/*.c') src += Glob('SWM341_StdPeriph_Driver/*.c')
if rtconfig.CROSS_TOOL == 'gcc': if rtconfig.PLATFORM in ['gcc']:
src += ['CMSIS/DeviceSupport/startup/gcc/startup_SWM341.s'] 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'] 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'] src += ['CMSIS/DeviceSupport/startup/iar/startup_SWM341.s']
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH) group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH)

View File

@ -19,8 +19,8 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armclang' PLATFORM = 'armclang'
EXEC_PATH = r'C:/Keil_v5' EXEC_PATH = r'C:/Keil_v5'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' PLATFORM = 'iccarm'
EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0' EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.3'
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')

View File

@ -29,12 +29,10 @@ if GetDepend('RT_USING_SFUD'):
if GetDepend('RT_SFUD_USING_SFDP'): if GetDepend('RT_SFUD_USING_SFDP'):
src_device += ['sfud/src/sfud_sfdp.c'] src_device += ['sfud/src/sfud_sfdp.c']
if rtconfig.PLATFORM in ['gcc']: if rtconfig.PLATFORM in ['gcc', 'armclang']:
LOCAL_CFLAGS += ' -std=c99' LOCAL_CFLAGS += ' -std=c99'
elif rtconfig.PLATFORM == 'armcc': elif rtconfig.PLATFORM in ['armcc']:
LOCAL_CFLAGS += ' --c99' LOCAL_CFLAGS += ' --c99'
elif rtconfig.PLATFORM == 'armclang':
LOCAL_CFLAGS += ' -std=c99'
src += src_device src += src_device

View File

@ -5,16 +5,14 @@ Import('rtconfig')
cwd = GetCurrentDir() cwd = GetCurrentDir()
src = Glob('*.cpp') + Glob('*.c') src = Glob('*.cpp') + Glob('*.c')
CPPPATH = [cwd]
if GetDepend('RT_USING_CPLUSPLUS11'): if GetDepend('RT_USING_CPLUSPLUS11'):
src += Glob('cpp11/*.cpp') + Glob('cpp11/*.c') src += Glob('cpp11/*.cpp') + Glob('cpp11/*.c')
if rtconfig.PLATFORM in ['armclang']:
CPPPATH = [cwd]
if rtconfig.PLATFORM == 'armclang' and GetDepend('RT_USING_CPLUSPLUS11'):
src += Glob('cpp11/armclang/*.cpp') + Glob('cpp11/armclang/*.c') src += Glob('cpp11/armclang/*.cpp') + Glob('cpp11/armclang/*.c')
CPPPATH += [cwd + '/cpp11/armclang'] CPPPATH += [cwd + '/cpp11/armclang']
elif rtconfig.PLATFORM in ['gcc'] and GetDepend('RT_USING_CPLUSPLUS11'): elif rtconfig.PLATFORM in ['gcc']:
src += Glob('cpp11/gcc/*.cpp') + Glob('cpp11/gcc/*.c') src += Glob('cpp11/gcc/*.cpp') + Glob('cpp11/gcc/*.c')
CPPPATH += [cwd + '/cpp11/gcc'] CPPPATH += [cwd + '/cpp11/gcc']

View File

@ -245,7 +245,7 @@ if GetDepend(['RT_USING_USB_DEVICE']):
if GetDepend(['RT_USING_SDCARD']): if GetDepend(['RT_USING_SDCARD']):
src += ['drv_sdcard.c'] src += ['drv_sdcard.c']
if rtconfig.PLATFORM == 'gcc': if rtconfig.PLATFORM in ['gcc']:
src += ['gcc_startup.s'] src += ['gcc_startup.s']
CPPPATH = [cwd] CPPPATH = [cwd]

View File

@ -124,7 +124,7 @@ class Win32Spawn:
# generate cconfig.h file # generate cconfig.h file
def GenCconfigFile(env, BuildOptions): def GenCconfigFile(env, BuildOptions):
if rtconfig.PLATFORM == 'gcc': if rtconfig.PLATFORM in ['gcc']:
contents = '' contents = ''
if not os.path.isfile('cconfig.h'): if not os.path.isfile('cconfig.h'):
import gcc import gcc
@ -287,7 +287,7 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
GenCconfigFile(env, BuildOptions) GenCconfigFile(env, BuildOptions)
# auto append '_REENT_SMALL' when using newlib 'nano.specs' option # 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']) env.AppendUnique(CPPDEFINES = ['_REENT_SMALL'])
if GetOption('genconfig'): if GetOption('genconfig'):
@ -618,7 +618,7 @@ def DefineGroup(name, src, depend, **parameters):
group['LOCAL_CPPPATH'] = paths group['LOCAL_CPPPATH'] = paths
if rtconfig.PLATFORM == 'gcc': if rtconfig.PLATFORM in ['gcc']:
if 'CFLAGS' in group: if 'CFLAGS' in group:
group['CFLAGS'] = utils.GCCC99Patch(group['CFLAGS']) group['CFLAGS'] = utils.GCCC99Patch(group['CFLAGS'])
if 'CCFLAGS' in group: if 'CCFLAGS' in group:
@ -695,9 +695,9 @@ def PreBuilding():
def GroupLibName(name, env): def GroupLibName(name, env):
if rtconfig.PLATFORM == 'armcc': if rtconfig.PLATFORM in ['armcc']:
return name + '_rvds' return name + '_rvds'
elif rtconfig.PLATFORM == 'gcc': elif rtconfig.PLATFORM in ['gcc']:
return name + '_gcc' return name + '_gcc'
return name return name

View File

@ -25,7 +25,7 @@ def GenerateCFiles(env,project):
AS = os.path.join(rtconfig.EXEC_PATH, rtconfig.AS).replace('\\', "/") AS = os.path.join(rtconfig.EXEC_PATH, rtconfig.AS).replace('\\', "/")
AR = os.path.join(rtconfig.EXEC_PATH, rtconfig.AR).replace('\\', "/") AR = os.path.join(rtconfig.EXEC_PATH, rtconfig.AR).replace('\\', "/")
LINK = os.path.join(rtconfig.EXEC_PATH, rtconfig.LINK).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('\\', "/") SIZE = os.path.join(rtconfig.EXEC_PATH, rtconfig.SIZE).replace('\\', "/")
OBJDUMP = os.path.join(rtconfig.EXEC_PATH, rtconfig.OBJDUMP).replace('\\', "/") OBJDUMP = os.path.join(rtconfig.EXEC_PATH, rtconfig.OBJDUMP).replace('\\', "/")
OBJCOPY = os.path.join(rtconfig.EXEC_PATH, rtconfig.OBJCPY).replace('\\', "/") OBJCOPY = os.path.join(rtconfig.EXEC_PATH, rtconfig.OBJCPY).replace('\\', "/")
@ -47,7 +47,7 @@ def GenerateCFiles(env,project):
AS += ".exe" AS += ".exe"
AR += ".exe" AR += ".exe"
LINK += ".exe" LINK += ".exe"
if rtconfig.PLATFORM == 'gcc': if rtconfig.PLATFORM in ['gcc']:
SIZE += ".exe" SIZE += ".exe"
OBJDUMP += ".exe" OBJDUMP += ".exe"
OBJCOPY += ".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_FLAGS \""+ CXXFLAGS + "\")\n")
cm_file.write("SET(CMAKE_CXX_COMPILER_WORKS TRUE)\n\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_OBJCOPY \""+ OBJCOPY + "\")\n")
cm_file.write("SET(CMAKE_SIZE \""+ SIZE + "\")\n\n") cm_file.write("SET(CMAKE_SIZE \""+ SIZE + "\")\n\n")
elif rtconfig.PLATFORM in ['armcc', 'armclang']: elif rtconfig.PLATFORM in ['armcc', 'armclang']:
@ -86,7 +86,7 @@ def GenerateCFiles(env,project):
LINKER_FLAGS = '' LINKER_FLAGS = ''
LINKER_LIBS = '' LINKER_LIBS = ''
if rtconfig.PLATFORM == 'gcc': if rtconfig.PLATFORM in ['gcc']:
LINKER_FLAGS += '-T' LINKER_FLAGS += '-T'
elif rtconfig.PLATFORM in ['armcc', 'armclang']: elif rtconfig.PLATFORM in ['armcc', 'armclang']:
LINKER_FLAGS += '--scatter' LINKER_FLAGS += '--scatter'
@ -126,7 +126,7 @@ def GenerateCFiles(env,project):
cm_file.write( "\t" + path.replace("\\", "/") + "\n" ) cm_file.write( "\t" + path.replace("\\", "/") + "\n" )
cm_file.write(")\n\n") cm_file.write(")\n\n")
if rtconfig.PLATFORM == 'gcc': if rtconfig.PLATFORM in ['gcc']:
cm_file.write("LINK_DIRECTORIES(\n") cm_file.write("LINK_DIRECTORIES(\n")
for group in project: for group in project:
if 'LIBPATH' in group.keys(): if 'LIBPATH' in group.keys():