2018-05-10 20:23:27 +08:00
|
|
|
Import('RTT_ROOT')
|
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
2018-05-18 13:46:45 +08:00
|
|
|
if GetDepend('BOARD_USING_HYPERFLASH'):
|
2018-05-12 05:33:04 +08:00
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = Glob('*.c')
|
2018-05-10 20:23:27 +08:00
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
|
|
|
if rtconfig.CROSS_TOOL == 'keil':
|
2018-05-12 05:33:04 +08:00
|
|
|
LINKFLAGS = '--keep=*(.boot_hdr.ivt)'
|
2018-05-10 20:23:27 +08:00
|
|
|
LINKFLAGS += '--keep=*(.boot_hdr.boot_data)'
|
|
|
|
LINKFLAGS += '--keep=*(.boot_hdr.dcd_data)'
|
|
|
|
LINKFLAGS += '--keep=*(.boot_hdr.conf)'
|
|
|
|
else:
|
|
|
|
LINKFLAGS = ''
|
|
|
|
|
2018-05-12 05:33:04 +08:00
|
|
|
group = DefineGroup('xip', src, depend = [''], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS)
|
|
|
|
Return('group')
|
2018-05-10 20:23:27 +08:00
|
|
|
|
2018-05-18 13:46:45 +08:00
|
|
|
if GetDepend('BOARD_USING_QSPIFLASH'):
|
2018-05-12 05:33:04 +08:00
|
|
|
group = []
|
|
|
|
Return('group')
|