diff --git a/bsp/stm32/libraries/HAL_Drivers/SConscript b/bsp/stm32/libraries/HAL_Drivers/SConscript index cc92c05f0c..c37704bb80 100644 --- a/bsp/stm32/libraries/HAL_Drivers/SConscript +++ b/bsp/stm32/libraries/HAL_Drivers/SConscript @@ -57,7 +57,9 @@ src += ['drv_common.c'] path = [cwd] path += [cwd + '/config'] -path += [cwd + '/drv_flash'] + +if GetDepend('BSP_USING_ON_CHIP_FLASH'): + path += [cwd + '/drv_flash'] group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)