Browse Source

[bsp][stm32][artpi]:add artpi eth ci

CYFS 3 months ago
parent
commit
a88c5d0cd5

+ 2 - 3
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)

+ 9 - 0
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
+

+ 3 - 1
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')
 

+ 5 - 0
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;