change to use SConscript to enable clear bss in startup.s

This commit is contained in:
LeeChunHei 2021-02-24 12:04:08 +08:00
parent 8ef1fa192a
commit b4cbfca550
4 changed files with 12 additions and 2 deletions

View File

@ -367,6 +367,7 @@ Reset_Handler:
blt .LC4
#endif /* __STARTUP_INITIALIZE_NONCACHEDATA */
#ifdef __STARTUP_CLEAR_BSS
/* This part of work usually is done in C library startup code. Otherwise,
* define this macro to enable it in this startup.
*
@ -384,6 +385,7 @@ Reset_Handler:
itt lt
strlt r0, [r1], #4
blt .LC5
#endif /* __STARTUP_CLEAR_BSS */
cpsie i /* Unmask interrupts */
#ifndef __START

View File

@ -76,6 +76,9 @@ if GetDepend(['BSP_USING_DMA']):
src += ['MIMXRT1052/drivers/fsl_lpspi_edma.c']
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path)
if rtconfig.CROSS_TOOL == 'gcc':
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, ASFLAGS = '$ASFLAGS -D __STARTUP_CLEAR_BSS')
else:
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path)
Return('group')

View File

@ -366,6 +366,7 @@ Reset_Handler:
blt .LC4
#endif /* __STARTUP_INITIALIZE_NONCACHEDATA */
#ifdef __STARTUP_CLEAR_BSS
/* This part of work usually is done in C library startup code. Otherwise,
* define this macro to enable it in this startup.
*
@ -383,6 +384,7 @@ Reset_Handler:
itt lt
strlt r0, [r1], #4
blt .LC5
#endif /* __STARTUP_CLEAR_BSS */
cpsie i /* Unmask interrupts */
#ifndef __START

View File

@ -74,6 +74,9 @@ if GetDepend(['RT_SERIAL_USING_DMA']):
src += ['MIMXRT1064/drivers/fsl_lpuart_edma.c']
src += ['MIMXRT1064/drivers/fsl_lpspi_edma.c']
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path)
if rtconfig.CROSS_TOOL == 'gcc':
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, ASFLAGS = '$ASFLAGS -D __STARTUP_CLEAR_BSS')
else:
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path)
Return('group')