76 lines
2.1 KiB
CMake
76 lines
2.1 KiB
CMake
# Generated Cmake Pico project file
|
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
|
set(CMAKE_C_STANDARD 11)
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
# Initialise pico_sdk from installed location
|
|
# (note this can come from environment, CMake cache etc)
|
|
|
|
# == DO NOT EDIT THE FOLLOWING LINES for the Raspberry Pi Pico VS Code Extension to work ==
|
|
if(WIN32)
|
|
set(USERHOME $ENV{USERPROFILE})
|
|
else()
|
|
set(USERHOME $ENV{HOME})
|
|
endif()
|
|
set(sdkVersion 2.1.1)
|
|
set(toolchainVersion 14_2_Rel1)
|
|
set(picotoolVersion 2.1.1)
|
|
set(picoVscode ${USERHOME}/.pico-sdk/cmake/pico-vscode.cmake)
|
|
if (EXISTS ${picoVscode})
|
|
include(${picoVscode})
|
|
endif()
|
|
# ====================================================================================
|
|
set(PICO_BOARD pico2 CACHE STRING "Board type")
|
|
|
|
# Pull in Raspberry Pi Pico SDK (must be before project)
|
|
include(pico_sdk_import.cmake)
|
|
|
|
project(PicoIris C CXX ASM)
|
|
|
|
# Initialise the Raspberry Pi Pico SDK
|
|
pico_sdk_init()
|
|
|
|
# Add executable. Default name is the project name, version 0.1
|
|
|
|
#add_executable(PicoIris src/PicoIris.cpp src/ov2640/camera.cpp src/ov2640/SCCB.cpp src/pio/i2c/pio_i2c.c)
|
|
|
|
add_executable(PicoIris src/PicoIris.cpp src/rp2040/ov2640.cpp src/rp2040/SCCB.cpp src/pio/i2c/pio_i2c.c)
|
|
#add_executable(PicoIris bus_scan.c)
|
|
|
|
pico_set_program_name(PicoIris "PicoIris")
|
|
pico_set_program_version(PicoIris "0.1")
|
|
|
|
# Generate PIO header
|
|
pico_generate_pio_header(PicoIris ${CMAKE_CURRENT_LIST_DIR}/image.pio ${CMAKE_CURRENT_LIST_DIR}/src/pio/i2c/i2c.pio)
|
|
|
|
# Modify the below lines to enable/disable output over UART/USB
|
|
pico_enable_stdio_uart(PicoIris 0)
|
|
pico_enable_stdio_usb(PicoIris 1)
|
|
|
|
# Add the standard include files to the build
|
|
target_include_directories(PicoIris PRIVATE
|
|
${CMAKE_CURRENT_LIST_DIR}
|
|
src/
|
|
src/ov2640/
|
|
src/pio/i2c/
|
|
)
|
|
|
|
# Add any user requested libraries
|
|
target_link_libraries(PicoIris
|
|
pico_stdlib
|
|
hardware_spi
|
|
hardware_i2c
|
|
hardware_dma
|
|
hardware_pwm
|
|
hardware_pio
|
|
hardware_interp
|
|
hardware_timer
|
|
hardware_clocks
|
|
)
|
|
|
|
pico_add_extra_outputs(PicoIris)
|
|
|