257 lines
8.4 KiB
CMake
257 lines
8.4 KiB
CMake
# CROSS COMPILER SETTING
|
|
SET(CMAKE_SYSTEM_NAME Generic)
|
|
CMAKE_MINIMUM_REQUIRED (VERSION 3.10.0)
|
|
|
|
# THE VERSION NUMBER
|
|
SET (Tutorial_VERSION_MAJOR 1)
|
|
SET (Tutorial_VERSION_MINOR 0)
|
|
|
|
# ENABLE ASM
|
|
ENABLE_LANGUAGE(ASM)
|
|
|
|
SET(CMAKE_STATIC_LIBRARY_PREFIX)
|
|
SET(CMAKE_STATIC_LIBRARY_SUFFIX)
|
|
|
|
SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX)
|
|
SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX)
|
|
|
|
# CURRENT DIRECTORY
|
|
SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
SET(EXECUTABLE_OUTPUT_PATH ${ProjDirPath}/${CMAKE_BUILD_TYPE})
|
|
SET(LIBRARY_OUTPUT_PATH ${ProjDirPath}/${CMAKE_BUILD_TYPE})
|
|
|
|
|
|
project(maestro_playback)
|
|
|
|
set(MCUX_BUILD_TYPES debug release)
|
|
|
|
set(MCUX_SDK_PROJECT_NAME maestro_playback.elf)
|
|
|
|
if (NOT DEFINED SdkRootDirPath)
|
|
SET(SdkRootDirPath ${ProjDirPath}/../../../../../..)
|
|
endif()
|
|
|
|
include(${ProjDirPath}/flags.cmake)
|
|
|
|
include(${ProjDirPath}/config.cmake)
|
|
|
|
add_executable(${MCUX_SDK_PROJECT_NAME}
|
|
"${ProjDirPath}/../streamer_pcm.c"
|
|
"${ProjDirPath}/../streamer_pcm_app.h"
|
|
"${ProjDirPath}/../app_data.h"
|
|
"${ProjDirPath}/../app_streamer.c"
|
|
"${ProjDirPath}/../app_streamer.h"
|
|
"${ProjDirPath}/../cmd.c"
|
|
"${ProjDirPath}/../cmd.h"
|
|
"${ProjDirPath}/../eap_proc.c"
|
|
"${ProjDirPath}/../eap_proc.h"
|
|
"${ProjDirPath}/../main.c"
|
|
"${ProjDirPath}/../main.h"
|
|
"${SdkRootDirPath}/boards/lpcxpresso55s69/audio_examples/maestro_playback/pin_mux.c"
|
|
"${SdkRootDirPath}/boards/lpcxpresso55s69/audio_examples/maestro_playback/pin_mux.h"
|
|
"${ProjDirPath}/../FreeRTOSConfig.h"
|
|
"${ProjDirPath}/../ffconf.h"
|
|
"${SdkRootDirPath}/boards/lpcxpresso55s69/audio_examples/common/att/eap_att.c"
|
|
"${SdkRootDirPath}/boards/lpcxpresso55s69/audio_examples/common/att/eap_att.h"
|
|
"${ProjDirPath}/../sdmmc_config.c"
|
|
"${ProjDirPath}/../sdmmc_config.h"
|
|
"${ProjDirPath}/../app_definitions.h"
|
|
"${ProjDirPath}/../board.c"
|
|
"${ProjDirPath}/../board.h"
|
|
"${ProjDirPath}/../clock_config.c"
|
|
"${ProjDirPath}/../clock_config.h"
|
|
)
|
|
|
|
target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
|
|
${ProjDirPath}/..
|
|
${SdkRootDirPath}/boards/lpcxpresso55s69/audio_examples/maestro_playback
|
|
${SdkRootDirPath}/boards/lpcxpresso55s69/audio_examples/common/att
|
|
${SdkRootDirPath}/boards/lpcxpresso55s69
|
|
)
|
|
|
|
set(CMAKE_MODULE_PATH
|
|
${SdkRootDirPath}/rtos/freertos/freertos-kernel
|
|
${SdkRootDirPath}/components/codec/wm8904
|
|
${SdkRootDirPath}/components/codec
|
|
${SdkRootDirPath}/devices/LPC55S69/drivers
|
|
${SdkRootDirPath}/components/codec/
|
|
${SdkRootDirPath}/components/codec/i2c
|
|
${SdkRootDirPath}/components/i2c
|
|
${SdkRootDirPath}/middleware/sdmmc
|
|
${SdkRootDirPath}/devices/LPC55S69/utilities
|
|
${SdkRootDirPath}/middleware/EAP
|
|
${SdkRootDirPath}/middleware/maestro
|
|
${SdkRootDirPath}/middleware/fatfs
|
|
${SdkRootDirPath}/middleware/maestro/mcu-audio/opus
|
|
${SdkRootDirPath}/middleware/maestro/mcu-audio/opusfile
|
|
${SdkRootDirPath}/middleware/maestro/mcu-audio/ogg
|
|
${SdkRootDirPath}/devices/LPC55S69
|
|
${SdkRootDirPath}/components/uart
|
|
${SdkRootDirPath}/components/serial_manager
|
|
${SdkRootDirPath}/components/lists
|
|
${SdkRootDirPath}/CMSIS/Core/Include
|
|
${SdkRootDirPath}/components/osa
|
|
${SdkRootDirPath}/middleware/maestro/streamer
|
|
)
|
|
|
|
# include modules
|
|
include(middleware_freertos-kernel_cm33_nonsecure_port_LPC55S69_cm33_core0)
|
|
|
|
include(driver_wm8904_LPC55S69_cm33_core0)
|
|
|
|
include(driver_codec_LPC55S69_cm33_core0)
|
|
|
|
include(driver_common_LPC55S69_cm33_core0)
|
|
|
|
include(component_wm8904_adapter_LPC55S69_cm33_core0)
|
|
|
|
include(component_codec_i2c_LPC55S69_cm33_core0)
|
|
|
|
include(component_flexcomm_i2c_adapter_LPC55S69_cm33_core0)
|
|
|
|
include(driver_sysctl_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_sdmmc_sd_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_sdmmc_common_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_sdmmc_host_sdif_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_sdmmc_host_sdif_freertos_LPC55S69_cm33_core0)
|
|
|
|
include(driver_lpc_iocon_LPC55S69_cm33_core0)
|
|
|
|
include(driver_flexcomm_i2c_LPC55S69_cm33_core0)
|
|
|
|
include(driver_flexcomm_i2s_LPC55S69_cm33_core0)
|
|
|
|
include(utility_shell_LPC55S69_cm33_core0)
|
|
|
|
include(driver_flexcomm_usart_LPC55S69_cm33_core0)
|
|
|
|
include(driver_lpc_dma_LPC55S69_cm33_core0)
|
|
|
|
include(driver_flexcomm_i2s_dma_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_eap_arm_lib_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_freertos-kernel_heap_4_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_maestro_framework_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_fatfs_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_fatfs_sd_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_eap_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_maestro_framework_opus_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_maestro_framework_opusfile_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_maestro_framework_ogg_LPC55S69_cm33_core0)
|
|
|
|
include(driver_clock_LPC55S69_cm33_core0)
|
|
|
|
include(driver_power_LPC55S69_cm33_core0)
|
|
|
|
include(device_LPC55S69_CMSIS_LPC55S69_cm33_core0)
|
|
|
|
include(device_LPC55S69_startup_LPC55S69_cm33_core0)
|
|
|
|
include(driver_flexcomm_LPC55S69_cm33_core0)
|
|
|
|
include(driver_lpc_gpio_LPC55S69_cm33_core0)
|
|
|
|
include(utility_assert_LPC55S69_cm33_core0)
|
|
|
|
include(utility_debug_console_LPC55S69_cm33_core0)
|
|
|
|
include(component_usart_adapter_LPC55S69_cm33_core0)
|
|
|
|
include(component_serial_manager_LPC55S69_cm33_core0)
|
|
|
|
include(component_lists_LPC55S69_cm33_core0)
|
|
|
|
include(component_serial_manager_uart_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_freertos-kernel_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_freertos-kernel_extension_LPC55S69_cm33_core0)
|
|
|
|
include(driver_reset_LPC55S69_cm33_core0)
|
|
|
|
include(CMSIS_Include_core_cm_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_sdmmc_osa_freertos_LPC55S69_cm33_core0)
|
|
|
|
include(component_osa_free_rtos_LPC55S69_cm33_core0)
|
|
|
|
include(driver_sdif_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_eap16_header_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_eap_exapp_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_maestro_framework_doc_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_maestro_framework_streamer_LPC55S69_cm33_core0)
|
|
|
|
include(utilities_misc_utilities_LPC55S69_cm33_core0)
|
|
|
|
include(device_LPC55S69_system_LPC55S69_cm33_core0)
|
|
|
|
|
|
IF(NOT DEFINED TARGET_LINK_SYSTEM_LIBRARIES)
|
|
SET(TARGET_LINK_SYSTEM_LIBRARIES "-lm -lc -lgcc -lnosys")
|
|
ENDIF()
|
|
|
|
TARGET_LINK_LIBRARIES(${MCUX_SDK_PROJECT_NAME} PRIVATE -Wl,--start-group)
|
|
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${TARGET_LINK_SYSTEM_LIBRARIES})
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL debug)
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${ProjDirPath}/../../../../../../middleware/EAP/EAP_Library/libEAP16_3_0_12_FP2_CM33.a)
|
|
endif(CMAKE_BUILD_TYPE STREQUAL debug)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL debug)
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${ProjDirPath}/../../../../../../middleware/maestro/libs/cm33f/armgcc/release/libmp3.a)
|
|
endif(CMAKE_BUILD_TYPE STREQUAL debug)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL debug)
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${ProjDirPath}/../../../../../../middleware/maestro/libs/cm33f/armgcc/release/libwav.a)
|
|
endif(CMAKE_BUILD_TYPE STREQUAL debug)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL debug)
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${ProjDirPath}/../../../../../../middleware/maestro/libs/cm33f/armgcc/release/libaac.a)
|
|
endif(CMAKE_BUILD_TYPE STREQUAL debug)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL debug)
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${ProjDirPath}/../../../../../../middleware/maestro/libs/cm33f/armgcc/release/libflac.a)
|
|
endif(CMAKE_BUILD_TYPE STREQUAL debug)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL release)
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${ProjDirPath}/../../../../../../middleware/EAP/EAP_Library/libEAP16_3_0_12_FP2_CM33.a)
|
|
endif(CMAKE_BUILD_TYPE STREQUAL release)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL release)
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${ProjDirPath}/../../../../../../middleware/maestro/libs/cm33f/armgcc/release/libmp3.a)
|
|
endif(CMAKE_BUILD_TYPE STREQUAL release)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL release)
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${ProjDirPath}/../../../../../../middleware/maestro/libs/cm33f/armgcc/release/libwav.a)
|
|
endif(CMAKE_BUILD_TYPE STREQUAL release)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL release)
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${ProjDirPath}/../../../../../../middleware/maestro/libs/cm33f/armgcc/release/libaac.a)
|
|
endif(CMAKE_BUILD_TYPE STREQUAL release)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL release)
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${ProjDirPath}/../../../../../../middleware/maestro/libs/cm33f/armgcc/release/libflac.a)
|
|
endif(CMAKE_BUILD_TYPE STREQUAL release)
|
|
|
|
TARGET_LINK_LIBRARIES(${MCUX_SDK_PROJECT_NAME} PRIVATE -Wl,--end-group)
|
|
|
|
|