From dde7a36d00bd5dafd1ffcd8d243dfbceeb20e856 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Mon, 13 Jan 2025 21:05:01 +0000 Subject: [PATCH] asf: sam: include: use new Kconfig options for SAMx7x Use the Kconfig symbols directly for determing SoC include directory for the Atmel SAM E70 and SAM V71 product series. These SoCs are part of a larger product family (SAM E70/S70/V70/V71) and share a common set of peripherals, and these series are now combined under one common CONFIG_SOC_SERIES in Zephyr. Signed-off-by: Henrik Brix Andersen --- asf/sam/include/CMakeLists.txt | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/asf/sam/include/CMakeLists.txt b/asf/sam/include/CMakeLists.txt index 7e07f6c3..b64159ec 100644 --- a/asf/sam/include/CMakeLists.txt +++ b/asf/sam/include/CMakeLists.txt @@ -1,6 +1,20 @@ -if(CONFIG_SOC_ATMEL_SAME70_REVB OR - CONFIG_SOC_ATMEL_SAMV71_REVB) - zephyr_include_directories(${CONFIG_SOC_SERIES}b) +if(CONFIG_SOC_SERIES_SAMX7X) + if(CONFIG_SOC_ATMEL_SAME70) + set(series "same70") + elseif(CONFIG_SOC_ATMEL_SAME70_REVB) + set(series "same70b") + elseif(CONFIG_SOC_ATMEL_SAMV71) + set(series "samv71") + elseif(CONFIG_SOC_ATMEL_SAMV71_REVB) + set(series "samv71b") + endif() else() - zephyr_include_directories(${CONFIG_SOC_SERIES}) + set(series ${CONFIG_SOC_SERIES}) +endif() + +if(series) + zephyr_include_directories(${series}) + unset(series) +else() + message(FATAL_ERROR "unsupported SoC series") endif()