1Import('RTT_ROOT')
2Import('rtconfig')
3from building import *
4from gcc import *
5
6cwd = GetCurrentDir()
7src = []
8group = []
9CPPPATH = []
10
11if rtconfig.PLATFORM in ['iccarm']:
12    print("\nThe current project does not support IAR build\n")
13    Return('group')
14elif rtconfig.PLATFORM in GetGCCLikePLATFORM():
15    if GetOption('target') != 'mdk5':
16        src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c')
17        src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c']
18        src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/startup.c']
19        src += Glob(cwd + '/fsp/src/r_*/*.c')
20        CPPPATH = [ cwd + '/arm/CMSIS_5/CMSIS/Core/Include',
21                    cwd + '/fsp/inc',
22                    cwd + '/fsp/inc/api',
23                    cwd + '/fsp/inc/instances',
24                    cwd + '/tes/dave2d/inc']
25
26        if GetDepend('BSP_USING_LCD') or GetDepend('BSP_USING_LVGL'):
27            src += Glob(cwd + '/tes/dave2d/src/*.c')
28            CPPPATH += [cwd + '/tes/dave2d/inc']
29
30group = DefineGroup('ra', src, depend = [''], CPPPATH = CPPPATH)
31Return('group')
32