diff --git a/bsp/stm32/libraries/STM32H7xx_HAL/SConscript b/bsp/stm32/libraries/STM32H7xx_HAL/SConscript index bade5c407a..8382e7ef58 100644 --- a/bsp/stm32/libraries/STM32H7xx_HAL/SConscript +++ b/bsp/stm32/libraries/STM32H7xx_HAL/SConscript @@ -113,10 +113,9 @@ if GetDepend(['BSP_USING_DCMI']): src += ['STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dcmi.c'] path = [cwd + '/STM32H7xx_HAL_Driver/Inc', - cwd + '/CMSIS/Device/ST/STM32H7xx/Include'] + cwd + '/CMSIS/Device/ST/STM32H7xx/Include', + cwd + '/STM32H7xx_HAL_Driver/Inc/Legacy'] -if GetDepend(['SOC_STM32H750_ARTPI']): - path += [cwd + '/STM32H7xx_HAL_Driver/Inc/Legacy'] CPPDEFINES = ['USE_HAL_DRIVER'] group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) diff --git a/bsp/stm32/stm32h750-artpi/.ci/attachconfig/ci.attachconfig.yml b/bsp/stm32/stm32h750-artpi/.ci/attachconfig/ci.attachconfig.yml new file mode 100644 index 0000000000..a7d8564224 --- /dev/null +++ b/bsp/stm32/stm32h750-artpi/.ci/attachconfig/ci.attachconfig.yml @@ -0,0 +1,9 @@ +scons.args: &scons + scons_arg: + - '--strict' + +# ------ peripheral CI ------ +peripheral.eth: + kconfig: + - CONFIG_BSP_USING_ETH_H750=y + diff --git a/bsp/stm32/stm32h750-artpi/board/SConscript b/bsp/stm32/stm32h750-artpi/board/SConscript index 05ca23480e..e66666eee0 100644 --- a/bsp/stm32/stm32h750-artpi/board/SConscript +++ b/bsp/stm32/stm32h750-artpi/board/SConscript @@ -11,7 +11,9 @@ list = os.listdir(cwd) # add the general drivers. src = Glob('board.c') src += Glob('CubeMX_Config/Core/Src/stm32h7xx_hal_msp.c') -src += Glob('port/drv_mpu.c') +if GetDepend(['BSP_SCB_ENABLE_I_CACHE']) or GetDepend(['BSP_SCB_ENABLE_D_CACHE']): + src += Glob('port/drv_mpu.c') + if GetDepend(['BSP_USING_QSPI_FLASH']): src += Glob('port/drv_qspi_flash.c') diff --git a/bsp/stm32/stm32h750-artpi/board/port/drv_mpu.c b/bsp/stm32/stm32h750-artpi/board/port/drv_mpu.c index b92483bedd..fe97e27189 100644 --- a/bsp/stm32/stm32h750-artpi/board/port/drv_mpu.c +++ b/bsp/stm32/stm32h750-artpi/board/port/drv_mpu.c @@ -86,8 +86,13 @@ int mpu_init(void) HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT); /* Enable CACHE */ +#ifdef BSP_SCB_ENABLE_I_CACHE SCB_EnableICache(); +#endif + +#ifdef BSP_SCB_ENABLE_D_CACHE SCB_EnableDCache(); +#endif return RT_EOK;