2022-09-23 17:43:45 +00:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
|
include(pico_sdk_import.cmake)
|
|
|
|
project(test_project C CXX ASM)
|
|
|
|
set(CMAKE_C_STANDARD 11)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
pico_sdk_init()
|
2022-11-03 21:46:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-23 17:43:45 +00:00
|
|
|
add_executable(test
|
|
|
|
test.c
|
2022-09-24 09:38:55 +00:00
|
|
|
spi_nb.c
|
2022-09-23 20:09:40 +00:00
|
|
|
gyro.c
|
2022-09-26 17:28:45 +00:00
|
|
|
Temps.c
|
2022-10-15 19:13:52 +00:00
|
|
|
Servomoteur.c
|
2022-10-16 08:26:44 +00:00
|
|
|
gyro_L3GD20H.c
|
2022-10-27 17:49:16 +00:00
|
|
|
gyro_ADXRS453.c
|
2022-11-03 21:46:41 +00:00
|
|
|
QEI.c
|
2022-09-23 17:43:45 +00:00
|
|
|
)
|
2022-10-27 17:49:16 +00:00
|
|
|
|
2022-11-03 21:46:41 +00:00
|
|
|
pico_generate_pio_header(test ${CMAKE_CURRENT_LIST_DIR}/quadrature_encoder.pio)
|
|
|
|
|
2022-10-27 17:49:16 +00:00
|
|
|
add_definitions(-DGYRO_ADXRS453)
|
2022-09-23 17:43:45 +00:00
|
|
|
pico_enable_stdio_usb(test 1)
|
|
|
|
pico_enable_stdio_uart(test 1)
|
|
|
|
pico_add_extra_outputs(test)
|
2022-11-03 21:46:41 +00:00
|
|
|
target_link_libraries(test pico_stdlib hardware_spi hardware_pwm hardware_structs hardware_pio)
|
2022-09-23 17:43:45 +00:00
|
|
|
|
|
|
|
add_custom_target(Flash
|
|
|
|
DEPENDS test
|
|
|
|
COMMAND sudo picotool load ${PROJECT_BINARY_DIR}/test.uf2
|
|
|
|
)
|