blob: 0029ab06a4ee055c145c2d486e5bf5285d356f01 [file]
# Set minimum required version of CMake
cmake_minimum_required(VERSION 3.12)
# Include build functions from Pico SDK
include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
# Set name of project (as PROJECT_NAME) and C/C++ standards
project(m1_ubmc C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
# Creates a pico-sdk subdirectory in our project for the libraries
pico_sdk_init()
# Tell CMake where to find the executable source file
add_executable(${PROJECT_NAME}
start.c
FUSB302.c
tcpm_driver.c
vdmtool.c
usb_descriptors.c
)
target_include_directories(${PROJECT_NAME} PUBLIC
${CMAKE_CURRENT_LIST_DIR}
)
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -funsigned-char)
# Create map/bin/hex/uf2 files
pico_add_extra_outputs(${PROJECT_NAME})
# Link to pico_stdlib (gpio, time, etc. functions)
target_link_libraries(${PROJECT_NAME}
pico_stdlib
hardware_i2c
pico_unique_id
tinyusb_board
tinyusb_device
)
#pico_set_binary_type(${PROJECT_NAME} no_flash)