249 lines
8.7 KiB
CMake
249 lines
8.7 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_record)
|
|
|
|
set(MCUX_SDK_PROJECT_NAME maestro_record.elf)
|
|
|
|
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_streamer.c"
|
|
"${ProjDirPath}/../app_streamer.h"
|
|
"${ProjDirPath}/../cmd.c"
|
|
"${ProjDirPath}/../cmd.h"
|
|
"${ProjDirPath}/../main.c"
|
|
"${ProjDirPath}/../main.h"
|
|
"${ProjDirPath}/../../pin_mux.c"
|
|
"${ProjDirPath}/../../pin_mux.h"
|
|
"${ProjDirPath}/../FreeRTOSConfig.h"
|
|
"${ProjDirPath}/../ffconf.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} PRIVATE
|
|
${ProjDirPath}/..
|
|
${ProjDirPath}/../..
|
|
${ProjDirPath}/../../../..
|
|
)
|
|
|
|
set(CMAKE_MODULE_PATH
|
|
${ProjDirPath}/../../../../../../rtos/freertos/freertos_kernel
|
|
${ProjDirPath}/../../../../../../components/codec/wm8904
|
|
${ProjDirPath}/../../../../../../components/codec
|
|
${ProjDirPath}/../../../../../../devices/LPC55S69/drivers
|
|
${ProjDirPath}/../../../../../../components/codec/i2c
|
|
${ProjDirPath}/../../../../../../components/i2c
|
|
${ProjDirPath}/../../../../../../middleware/sdmmc
|
|
${ProjDirPath}/../../../../../../devices/LPC55S69/utilities
|
|
${ProjDirPath}/../../../../../../middleware/maestro
|
|
${ProjDirPath}/../../../../../../middleware/fatfs
|
|
${ProjDirPath}/../../../../../../devices/LPC55S69
|
|
${ProjDirPath}/../../../../../../components/uart
|
|
${ProjDirPath}/../../../../../../components/serial_manager
|
|
${ProjDirPath}/../../../../../../components/lists
|
|
${ProjDirPath}/../../../../../../CMSIS/Core/Include
|
|
${ProjDirPath}/../../../../../../components/osa
|
|
)
|
|
|
|
# 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_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(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_maestro_framework_doc_LPC55S69_cm33_core0)
|
|
|
|
include(utilities_misc_utilities_LPC55S69_cm33_core0)
|
|
|
|
include(device_LPC55S69_system_LPC55S69_cm33_core0)
|
|
|
|
|
|
TARGET_LINK_LIBRARIES(${MCUX_SDK_PROJECT_NAME} PRIVATE -Wl,--start-group)
|
|
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE m)
|
|
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE c)
|
|
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE gcc)
|
|
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE nosys)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL debug)
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${ProjDirPath}/../../../../../../middleware/maestro/libs/cm33f/armgcc/release/libmaestro_streamer.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/libmaestro_cci.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/libmaestro_utils.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/libopus.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/libogg.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/libsrc48.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 release)
|
|
target_link_libraries(${MCUX_SDK_PROJECT_NAME} PRIVATE ${ProjDirPath}/../../../../../../middleware/maestro/libs/cm33f/armgcc/release/libmaestro_streamer.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/libmaestro_cci.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/libmaestro_utils.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/libopus.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/libogg.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/libsrc48.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)
|
|
|
|
TARGET_LINK_LIBRARIES(${MCUX_SDK_PROJECT_NAME} PRIVATE -Wl,--end-group)
|
|
|
|
|