From 8a41f9e1cba1c3daba8fa9b31fdc31d715c464a5 Mon Sep 17 00:00:00 2001 From: Daniel Berhe Date: Thu, 10 Oct 2024 09:36:49 +0100 Subject: [PATCH] mcux: add support for imxrt1176 rtwdog Signed-off-by: Daniel Berhe --- mcux/hal_nxp.cmake | 1 + .../MIMXRT1176/set_device_MIMXRT1176.cmake | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/mcux/hal_nxp.cmake b/mcux/hal_nxp.cmake index cc02c3948..b7b027490 100644 --- a/mcux/hal_nxp.cmake +++ b/mcux/hal_nxp.cmake @@ -225,6 +225,7 @@ include_driver_ifdef(CONFIG_PWM_MCUX pwm driver_pwm) include_driver_ifdef(CONFIG_VIDEO_MCUX_CSI csi driver_csi) include_driver_ifdef(CONFIG_VIDEO_MCUX_MIPI_CSI2RX mipi_csi2rx driver_mipi_csi2rx) include_driver_ifdef(CONFIG_WDT_MCUX_IMX_WDOG wdog01 driver_wdog01) +include_driver_ifdef(CONFIG_WDT_MCUX_IMX_RTWDOG rtwdog driver_rtwdog) include_driver_ifdef(CONFIG_DMA_MCUX_LPC lpc_dma driver_lpc_dma) include_driver_ifdef(CONFIG_MEMC_MCUX_FLEXSPI flexspi driver_flexspi) include_driver_ifdef(CONFIG_HAS_MCUX_RDC rdc driver_rdc) diff --git a/mcux/mcux-sdk/devices/MIMXRT1176/set_device_MIMXRT1176.cmake b/mcux/mcux-sdk/devices/MIMXRT1176/set_device_MIMXRT1176.cmake index 0e2b49a70..837b2f7a4 100644 --- a/mcux/mcux-sdk/devices/MIMXRT1176/set_device_MIMXRT1176.cmake +++ b/mcux/mcux-sdk/devices/MIMXRT1176/set_device_MIMXRT1176.cmake @@ -4660,6 +4660,29 @@ endif() endif() +if (CONFIG_USE_driver_rtwdog) +# Add set(CONFIG_USE_driver_rtwdog true) in config.cmake to use this component + +message("driver_rtwdog component is included from ${CMAKE_CURRENT_LIST_FILE}.") + +if((CONFIG_DEVICE_ID STREQUAL MIMXRT1176xxxxx) AND CONFIG_USE_driver_common) + +target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE + ${CMAKE_CURRENT_LIST_DIR}/../../drivers/rtwdog/fsl_rtwdog.c +) + +target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/../../drivers/rtwdog/. +) + +else() + +message(SEND_ERROR "driver_rtwdog.MIMXRT1176 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") + +endif() + +endif() + if (CONFIG_USE_driver_xbara) # Add set(CONFIG_USE_driver_xbara true) in config.cmake to use this component