1include_guard(GLOBAL) 2 3 4if (CONFIG_USE_middleware_mmcau_mmcau_files) 5# Add set(CONFIG_USE_middleware_mmcau_mmcau_files true) in config.cmake to use this component 6 7message("middleware_mmcau_mmcau_files component is included from ${CMAKE_CURRENT_LIST_FILE}.") 8 9if(CONFIG_CORE STREQUAL cm0p) 10 target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 11 ${CMAKE_CURRENT_LIST_DIR}/./asm-cm0p/src/mmcau_aes_functions.s 12 ${CMAKE_CURRENT_LIST_DIR}/./asm-cm0p/src/mmcau_des_functions.s 13 ${CMAKE_CURRENT_LIST_DIR}/./asm-cm0p/src/mmcau_md5_functions.s 14 ${CMAKE_CURRENT_LIST_DIR}/./asm-cm0p/src/mmcau_sha1_functions.s 15 ${CMAKE_CURRENT_LIST_DIR}/./asm-cm0p/src/mmcau_sha256_functions.s 16 ) 17endif() 18 19if((CONFIG_CORE STREQUAL cm4f OR CONFIG_CORE STREQUAL cm7f)) 20 target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 21 ${CMAKE_CURRENT_LIST_DIR}/./asm-cm4-cm7/src/mmcau_aes_functions.s 22 ${CMAKE_CURRENT_LIST_DIR}/./asm-cm4-cm7/src/mmcau_des_functions.s 23 ${CMAKE_CURRENT_LIST_DIR}/./asm-cm4-cm7/src/mmcau_md5_functions.s 24 ${CMAKE_CURRENT_LIST_DIR}/./asm-cm4-cm7/src/mmcau_sha1_functions.s 25 ${CMAKE_CURRENT_LIST_DIR}/./asm-cm4-cm7/src/mmcau_sha256_functions.s 26 ) 27endif() 28 29 30endif() 31 32 33if (CONFIG_USE_middleware_mmcau_cm4_cm7) 34# Add set(CONFIG_USE_middleware_mmcau_cm4_cm7 true) in config.cmake to use this component 35 36message("middleware_mmcau_cm4_cm7 component is included from ${CMAKE_CURRENT_LIST_FILE}.") 37 38if((CONFIG_CORE STREQUAL cm4f OR CONFIG_CORE STREQUAL cm7f) AND CONFIG_USE_middleware_mmcau_common_files AND CONFIG_USE_driver_clock AND CONFIG_USE_driver_common) 39 40target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 41 ${CMAKE_CURRENT_LIST_DIR}/./. 42) 43 44if((CONFIG_TOOLCHAIN STREQUAL armgcc OR CONFIG_TOOLCHAIN STREQUAL mcux)) 45 target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE 46 -Wl,--start-group 47 ${CMAKE_CURRENT_LIST_DIR}/./asm-cm4-cm7/lib_mmcau.a 48 -Wl,--end-group 49 ) 50endif() 51 52else() 53 54message(SEND_ERROR "middleware_mmcau_cm4_cm7 dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 55 56endif() 57 58endif() 59 60 61if (CONFIG_USE_middleware_mmcau_cm0p) 62# Add set(CONFIG_USE_middleware_mmcau_cm0p true) in config.cmake to use this component 63 64message("middleware_mmcau_cm0p component is included from ${CMAKE_CURRENT_LIST_FILE}.") 65 66if((CONFIG_CORE STREQUAL cm0p) AND CONFIG_USE_middleware_mmcau_common_files AND CONFIG_USE_driver_clock AND CONFIG_USE_driver_common) 67 68target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 69 ${CMAKE_CURRENT_LIST_DIR}/./. 70) 71 72if((CONFIG_TOOLCHAIN STREQUAL armgcc OR CONFIG_TOOLCHAIN STREQUAL mcux)) 73 target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE 74 -Wl,--start-group 75 ${CMAKE_CURRENT_LIST_DIR}/./asm-cm0p/lib_mmcau-cm0p.a 76 -Wl,--end-group 77 ) 78endif() 79 80else() 81 82message(SEND_ERROR "middleware_mmcau_cm0p dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 83 84endif() 85 86endif() 87 88 89if (CONFIG_USE_middleware_mmcau_common_files) 90# Add set(CONFIG_USE_middleware_mmcau_common_files true) in config.cmake to use this component 91 92message("middleware_mmcau_common_files component is included from ${CMAKE_CURRENT_LIST_FILE}.") 93 94if(CONFIG_USE_driver_common) 95 96target_sources(${MCUX_SDK_PROJECT_NAME} PRIVATE 97 ${CMAKE_CURRENT_LIST_DIR}/./fsl_mmcau.c 98) 99 100target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC 101 ${CMAKE_CURRENT_LIST_DIR}/./. 102) 103 104else() 105 106message(SEND_ERROR "middleware_mmcau_common_files dependency does not meet, please check ${CMAKE_CURRENT_LIST_FILE}.") 107 108endif() 109 110endif() 111 112