[WDT] Update for DM build

Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
GuEe-GUI 2025-07-10 13:58:11 +08:00 committed by Rbb666
parent 1d7516999b
commit 37818aa518
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,7 @@
config RT_USING_WDT
menuconfig RT_USING_WDT
bool "Using Watch Dog device drivers"
default n
if RT_USING_DM && RT_USING_WDT
osource "$(SOC_DM_WDT_DIR)/Kconfig"
endif

View File

@ -1,8 +1,16 @@
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
group = []
if not GetDepend(['RT_USING_WDT']):
Return('group')
cwd = GetCurrentDir()
list = os.listdir(cwd)
CPPPATH = [cwd + '/../include']
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_WDT'], CPPPATH = CPPPATH)
src = ['dev_watchdog.c']
group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
Return('group')