2022-05-19 14:06:35 +08:00
|
|
|
Import('RTT_ROOT')
|
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
if GetDepend('BSP_USING_QSPIFLASH'):
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = Glob('*.c')
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
2022-08-15 22:32:27 +08:00
|
|
|
if rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2022-08-04 10:43:50 +08:00
|
|
|
LINKFLAGS = ' --keep=*(.boot_hdr.ivt)'
|
|
|
|
LINKFLAGS += ' --keep=*(.boot_hdr.boot_data)'
|
|
|
|
LINKFLAGS += ' --keep=*(.boot_hdr.dcd_data)'
|
|
|
|
LINKFLAGS += ' --keep=*(.boot_hdr.conf)'
|
|
|
|
LINKFLAGS += ' --predefine="-DXIP_BOOT_HEADER_ENABLE=1"'
|
2022-05-19 14:06:35 +08:00
|
|
|
else:
|
|
|
|
LINKFLAGS = ''
|
|
|
|
|
2022-08-15 11:21:27 +08:00
|
|
|
group = DefineGroup('xip', src, depend = [''], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS)
|
|
|
|
Return('group')
|