1# SPDX-License-Identifier: Apache-2.0 2 3cmake_minimum_required(VERSION 3.20.0) 4 5find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) 6project(zperf) 7 8target_sources(app PRIVATE 9 src/main.c 10 ) 11 12if (CONFIG_NET_SAMPLE_CODE_RELOCATE) 13 # Relocate key networking stack components and L2 layer to RAM 14 zephyr_code_relocate(LIBRARY subsys__net__ip 15 LOCATION "${CONFIG_NET_SAMPLE_CODE_RAM_NAME}_TEXT" NOKEEP) 16 zephyr_code_relocate(LIBRARY subsys__net 17 LOCATION "${CONFIG_NET_SAMPLE_CODE_RAM_NAME}_TEXT" NOKEEP) 18if (CONFIG_NET_L2_ETHERNET) 19 zephyr_code_relocate(LIBRARY drivers__ethernet 20 LOCATION "${CONFIG_NET_SAMPLE_CODE_RAM_NAME}_TEXT" NOKEEP) 21 zephyr_code_relocate(LIBRARY subsys__net__l2__ethernet 22 LOCATION "${CONFIG_NET_SAMPLE_CODE_RAM_NAME}_TEXT" NOKEEP) 23endif() 24endif() 25 26if (CONFIG_USB_DEVICE_STACK_NEXT) 27 include(${ZEPHYR_BASE}/samples/subsys/usb/common/common.cmake) 28endif() 29 30if (CONFIG_SOC_NRF5340_CPUAPP) 31 target_sources(app PRIVATE 32 src/nrf5340_cpu_boost.c 33 ) 34endif() 35