diff --git a/components/drivers/spi/SConscript b/components/drivers/spi/SConscript index df0ffb7141..94c78456dc 100644 --- a/components/drivers/spi/SConscript +++ b/components/drivers/spi/SConscript @@ -31,10 +31,11 @@ if GetDepend('RT_USING_SFUD'): if GetDepend('RT_SFUD_USING_SFDP'): src_device += ['sfud/src/sfud_sfdp.c'] - if rtconfig.PLATFORM in GetGCCLikePLATFORM(): - LOCAL_CFLAGS += ' -std=c99' - elif rtconfig.PLATFORM in ['armcc']: - LOCAL_CFLAGS += ' --c99' + if not GetDepend('RT_USING_DM'): + if rtconfig.PLATFORM in GetGCCLikePLATFORM(): + LOCAL_CFLAGS += ' -std=c99' + elif rtconfig.PLATFORM in ['armcc']: + LOCAL_CFLAGS += ' --c99' if GetDepend('RT_USING_DM'): src += ['dev_spi_dm.c', 'dev_spi_bus.c']