166 lines
4.3 KiB
CMake
166 lines
4.3 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(usb_pd_bm)
|
|
|
|
set(MCUX_BUILD_TYPES debug release)
|
|
|
|
set(MCUX_SDK_PROJECT_NAME usb_pd_bm.elf)
|
|
|
|
if (NOT DEFINED SdkRootDirPath)
|
|
SET(SdkRootDirPath ${ProjDirPath}/../../../../../../..)
|
|
endif()
|
|
|
|
include(${ProjDirPath}/flags.cmake)
|
|
|
|
include(${ProjDirPath}/config.cmake)
|
|
|
|
add_executable(${MCUX_SDK_PROJECT_NAME}
|
|
"${ProjDirPath}/../pd_board_config.h"
|
|
"${ProjDirPath}/../pd_app_demo.c"
|
|
"${ProjDirPath}/../pd_app.c"
|
|
"${ProjDirPath}/../pd_app.h"
|
|
"${ProjDirPath}/../pd_command_app.c"
|
|
"${ProjDirPath}/../pd_command_interface.c"
|
|
"${ProjDirPath}/../pd_command_interface.h"
|
|
"${ProjDirPath}/../pd_power_app.c"
|
|
"${ProjDirPath}/../pd_power_interface.c"
|
|
"${ProjDirPath}/../pd_power_interface.h"
|
|
"${ProjDirPath}/../usb_pd_config.h"
|
|
"${ProjDirPath}/../pd_power_nx20p3483.c"
|
|
"${ProjDirPath}/../pd_power_nx20p3483.h"
|
|
"${ProjDirPath}/../board.c"
|
|
"${ProjDirPath}/../board.h"
|
|
"${ProjDirPath}/../clock_config.c"
|
|
"${ProjDirPath}/../clock_config.h"
|
|
"${ProjDirPath}/../pin_mux.c"
|
|
"${ProjDirPath}/../pin_mux.h"
|
|
)
|
|
|
|
target_include_directories(${MCUX_SDK_PROJECT_NAME} PUBLIC
|
|
${ProjDirPath}/..
|
|
)
|
|
|
|
set(CMAKE_MODULE_PATH
|
|
${SdkRootDirPath}/middleware/usb
|
|
${SdkRootDirPath}/devices/LPC55S69/drivers
|
|
${SdkRootDirPath}/components/i2c
|
|
${SdkRootDirPath}/middleware
|
|
${SdkRootDirPath}/components/osa
|
|
${SdkRootDirPath}/devices/LPC55S69
|
|
${SdkRootDirPath}/devices/LPC55S69/utilities
|
|
${SdkRootDirPath}/components/uart
|
|
${SdkRootDirPath}/components/serial_manager
|
|
${SdkRootDirPath}/components/lists
|
|
${SdkRootDirPath}/components/gpio
|
|
${SdkRootDirPath}/components/timer
|
|
${SdkRootDirPath}/CMSIS/Core/Include
|
|
)
|
|
|
|
# include modules
|
|
include(middleware_usb_pd_phy_ptn5110_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_usb_pd_LPC55S69_cm33_core0)
|
|
|
|
include(driver_lpc_dma_LPC55S69_cm33_core0)
|
|
|
|
include(driver_flexcomm_i2c_LPC55S69_cm33_core0)
|
|
|
|
include(driver_flexcomm_i2c_dma_LPC55S69_cm33_core0)
|
|
|
|
include(component_flexcomm_i2c_adapter_LPC55S69_cm33_core0)
|
|
|
|
include(driver_mrt_LPC55S69_cm33_core0)
|
|
|
|
include(driver_gint_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_baremetal_LPC55S69_cm33_core0)
|
|
|
|
include(component_osa_bm_LPC55S69_cm33_core0)
|
|
|
|
include(driver_clock_LPC55S69_cm33_core0)
|
|
|
|
include(driver_power_LPC55S69_cm33_core0)
|
|
|
|
include(driver_common_LPC55S69_cm33_core0)
|
|
|
|
include(device_LPC55S69_CMSIS_LPC55S69_cm33_core0)
|
|
|
|
include(device_LPC55S69_startup_LPC55S69_cm33_core0)
|
|
|
|
include(driver_flexcomm_usart_LPC55S69_cm33_core0)
|
|
|
|
include(driver_flexcomm_LPC55S69_cm33_core0)
|
|
|
|
include(driver_lpc_gpio_LPC55S69_cm33_core0)
|
|
|
|
include(driver_lpc_iocon_LPC55S69_cm33_core0)
|
|
|
|
include(driver_reset_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(component_lpc_gpio_adapter_LPC55S69_cm33_core0)
|
|
|
|
include(component_mrt_adapter_LPC55S69_cm33_core0)
|
|
|
|
include(driver_inputmux_LPC55S69_cm33_core0)
|
|
|
|
include(driver_pint_LPC55S69_cm33_core0)
|
|
|
|
include(CMSIS_Include_core_cm_LPC55S69_cm33_core0)
|
|
|
|
include(driver_inputmux_connections_LPC55S69_cm33_core0)
|
|
|
|
include(component_osa_LPC55S69_cm33_core0)
|
|
|
|
include(middleware_usb_pd_common_header_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})
|
|
|
|
TARGET_LINK_LIBRARIES(${MCUX_SDK_PROJECT_NAME} PRIVATE -Wl,--end-group)
|
|
|
|
|