1#Description: Common Driver; user_visible: True 2include_guard(GLOBAL) 3message("driver_common component is included.") 4 5if((DEFINED CMAKE_C_COMPILER) AND ((${CMAKE_C_COMPILER} MATCHES "xtensa") OR (${CMAKE_C_COMPILER} MATCHES "xt-clang"))) 6 set(MCUX_CPU_ARCH "DSP") 7endif() 8 9#Include core specific common file 10set(SPECIFIC_COMMON_FILE "") 11if(MCUX_CPU_ARCH MATCHES "DSP") 12 set(SPECIFIC_COMMON_FILE "fsl_common_dsp.c") 13else() 14 set(SPECIFIC_COMMON_FILE "fsl_common_arm.c") 15endif() 16 17target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 18 ${CMAKE_CURRENT_LIST_DIR}/fsl_common.c 19 ${CMAKE_CURRENT_LIST_DIR}/${SPECIFIC_COMMON_FILE} 20) 21 22target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 23 ${CMAKE_CURRENT_LIST_DIR}/. 24) 25 26include(driver_reset) 27 28#CMSIS is not needed for Audio DSP 29if(NOT (${MCUX_CPU_ARCH} MATCHES "DSP")) 30 include(device_CMSIS) 31endif() 32