diff --git a/bsp/stm32/stm32l475-atk-pandora/board/ports/fal/SConscript b/bsp/stm32/stm32l475-atk-pandora/board/ports/fal/SConscript index 045b8d91df..c8931044c5 100644 --- a/bsp/stm32/stm32l475-atk-pandora/board/ports/fal/SConscript +++ b/bsp/stm32/stm32l475-atk-pandora/board/ports/fal/SConscript @@ -10,13 +10,12 @@ src += Glob('*.c') CPPPATH = [cwd] LOCAL_CFLAGS = '' -if rtconfig.CROSS_TOOL == 'gcc': +if rtconfig.PLATFORM == 'gcc': + LOCAL_CFLAGS += ' -std=c99' +elif rtconfig.PLATFORM == 'armcc': + LOCAL_CFLAGS += ' --c99' +elif rtconfig.PLATFORM == 'armclang': LOCAL_CFLAGS += ' -std=c99' -elif rtconfig.CROSS_TOOL == 'keil': - if rtconfig.PLATFORM == 'armcc': - LOCAL_CFLAGS += ' --c99' - elif rtconfig.PLATFORM == 'armclang': - LOCAL_CFLAGS += ' -std=c99' group = DefineGroup('FAL', src, depend = ['PKG_USING_FAL'], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS) diff --git a/components/drivers/spi/SConscript b/components/drivers/spi/SConscript index fab1298f8a..81d2c4c8a0 100644 --- a/components/drivers/spi/SConscript +++ b/components/drivers/spi/SConscript @@ -25,13 +25,13 @@ if GetDepend('RT_USING_SFUD'): CPPPATH += [cwd + '/sfud/inc'] if GetDepend('RT_SFUD_USING_SFDP'): src_device += ['sfud/src/sfud_sfdp.c'] - if rtconfig.CROSS_TOOL == 'gcc': + + if rtconfig.PLATFORM == 'gcc': + LOCAL_CFLAGS += ' -std=c99' + elif rtconfig.PLATFORM == 'armcc': + LOCAL_CFLAGS += ' --c99' + elif rtconfig.PLATFORM == 'armclang': LOCAL_CFLAGS += ' -std=c99' - elif rtconfig.CROSS_TOOL == 'keil': - if rtconfig.PLATFORM == 'armcc': - LOCAL_CFLAGS += ' --c99' - elif rtconfig.PLATFORM == 'armclang': - LOCAL_CFLAGS += ' -std=c99' src += src_device