generated from LailaTheElf/rp2040_c
update
This commit is contained in:
@@ -1,21 +1,31 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
# initialize the SDK based on PICO_SDK_PATH
|
||||
# note: this must happen before project()
|
||||
include(libs/pico-sdk/pico_sdk_init.cmake)
|
||||
set(PICO_SDK_PATH $ENV{PICO_SDK_PATH})
|
||||
include(pico_sdk_import.cmake)
|
||||
|
||||
project(temp_sensor_debug)
|
||||
project(temp_sensor)
|
||||
|
||||
# initialize the Raspberry Pi Pico SDK
|
||||
pico_sdk_init()
|
||||
|
||||
add_executable(my_project
|
||||
src/main.c
|
||||
src/max31856.c
|
||||
add_subdirectory(libs/adafruitGFX/AdafruitGFXPico)
|
||||
|
||||
add_executable(temp_sensor_debug
|
||||
src/main.cpp
|
||||
src/max31856.cpp
|
||||
)
|
||||
|
||||
# Add pico_stdlib library which aggregates commonly used features
|
||||
target_link_libraries(my_project pico_stdlib hardware_spi)
|
||||
target_link_libraries(temp_sensor_debug pico_stdlib hardware_spi AdafruitGFXPico)
|
||||
target_compile_options(temp_sensor_debug PRIVATE -Og)
|
||||
pico_enable_stdio_usb(temp_sensor_debug 1)
|
||||
pico_enable_stdio_uart(temp_sensor_debug 0)
|
||||
|
||||
# create map/bin/hex/uf2 file in addition to ELF.
|
||||
pico_add_extra_outputs(my_project)
|
||||
add_executable(temp_sensor
|
||||
src/main.cpp
|
||||
src/max31856.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(temp_sensor pico_stdlib hardware_spi AdafruitGFXPico)
|
||||
target_compile_options(temp_sensor PRIVATE -Ofast)
|
||||
pico_enable_stdio_usb(temp_sensor 1)
|
||||
pico_enable_stdio_uart(temp_sensor 0)
|
||||
|
||||
Reference in New Issue
Block a user