2021-01-20 16:44:27 +00:00
|
|
|
add_library(kitchen_sink_libs INTERFACE)
|
|
|
|
target_link_libraries(kitchen_sink_libs INTERFACE
|
|
|
|
hardware_adc
|
|
|
|
hardware_clocks
|
|
|
|
hardware_divider
|
2021-05-05 16:45:39 +00:00
|
|
|
hardware_exception
|
2021-01-20 16:44:27 +00:00
|
|
|
hardware_dma
|
|
|
|
hardware_flash
|
|
|
|
hardware_gpio
|
|
|
|
hardware_i2c
|
|
|
|
hardware_interp
|
|
|
|
hardware_irq
|
|
|
|
hardware_pio
|
|
|
|
hardware_pll
|
|
|
|
hardware_pwm
|
|
|
|
hardware_resets
|
|
|
|
hardware_rtc
|
|
|
|
hardware_uart
|
|
|
|
hardware_spi
|
|
|
|
hardware_sync
|
|
|
|
hardware_timer
|
|
|
|
hardware_uart
|
|
|
|
hardware_vreg
|
|
|
|
hardware_watchdog
|
|
|
|
hardware_xosc
|
|
|
|
pico_bit_ops
|
|
|
|
pico_bootrom
|
2021-02-18 16:12:22 +00:00
|
|
|
pico_bootsel_via_double_reset
|
2021-01-20 16:44:27 +00:00
|
|
|
pico_divider
|
|
|
|
pico_double
|
|
|
|
pico_fix_rp2040_usb_device_enumeration
|
|
|
|
pico_float
|
2023-02-07 13:47:01 +00:00
|
|
|
pico_i2c_slave
|
2021-01-20 16:44:27 +00:00
|
|
|
pico_int64_ops
|
|
|
|
pico_malloc
|
|
|
|
pico_mem_ops
|
|
|
|
pico_multicore
|
|
|
|
pico_platform
|
2023-01-27 16:59:59 +00:00
|
|
|
pico_rand
|
2021-01-20 16:44:27 +00:00
|
|
|
pico_stdlib
|
|
|
|
pico_sync
|
|
|
|
pico_time
|
2021-02-02 17:41:37 +00:00
|
|
|
pico_unique_id
|
2021-01-20 16:44:27 +00:00
|
|
|
pico_util
|
|
|
|
)
|
|
|
|
|
|
|
|
add_library(kitchen_sink_options INTERFACE)
|
|
|
|
|
|
|
|
target_compile_options(kitchen_sink_options INTERFACE
|
|
|
|
-Werror
|
|
|
|
-Wall
|
|
|
|
-Wextra
|
2021-02-15 16:06:12 +00:00
|
|
|
# -pedantic
|
|
|
|
|
2021-01-20 16:44:27 +00:00
|
|
|
-Wnull-dereference
|
2021-02-15 16:06:12 +00:00
|
|
|
-Wuninitialized
|
|
|
|
-Wunused
|
|
|
|
-Wcast-align
|
2021-01-20 16:44:27 +00:00
|
|
|
-Wall
|
|
|
|
-Wcast-qual
|
|
|
|
-Wfloat-equal
|
|
|
|
-Wmissing-format-attribute
|
2022-06-30 04:03:32 +00:00
|
|
|
#-Wconversion
|
2021-04-07 01:50:26 +00:00
|
|
|
-Wsign-compare
|
2021-02-07 22:04:25 +00:00
|
|
|
$<$<COMPILE_LANGUAGE:C>:-Wstrict-prototypes>
|
2021-01-20 16:44:27 +00:00
|
|
|
|
2021-02-15 16:06:12 +00:00
|
|
|
-Wno-inline
|
2021-01-20 16:44:27 +00:00
|
|
|
# todo not sure these are true, but investigate
|
|
|
|
#-Wpacked
|
|
|
|
|
|
|
|
# todo we have some of these in usb_device_tiny to try to make it more readable.. perhaps doxygen would help here instead
|
2021-02-15 16:06:12 +00:00
|
|
|
-Wredundant-decls
|
|
|
|
|
2021-01-20 16:44:27 +00:00
|
|
|
-Wno-shadow
|
|
|
|
-Wno-missing-field-initializers
|
|
|
|
-Wno-missing-braces
|
|
|
|
-Wno-multichar
|
|
|
|
|
|
|
|
# todo useful but fix later
|
|
|
|
#-Wundef
|
|
|
|
)
|
|
|
|
|
|
|
|
target_compile_definitions(kitchen_sink_libs INTERFACE
|
2021-04-07 01:50:26 +00:00
|
|
|
PARAM_ASSERTIONS_ENABLE_ALL=1 # want to check all the assertions for compilation warnings
|
2021-01-20 16:44:27 +00:00
|
|
|
PICO_AUDIO_DMA_IRQ=1
|
|
|
|
)
|
|
|
|
|
2021-12-08 18:05:49 +00:00
|
|
|
add_executable(kitchen_sink ${CMAKE_CURRENT_LIST_DIR}/kitchen_sink.c)
|
2021-01-20 16:44:27 +00:00
|
|
|
target_link_libraries(kitchen_sink kitchen_sink_libs kitchen_sink_options)
|
2021-02-02 17:57:11 +00:00
|
|
|
pico_set_program_name(kitchen_sink "Wombat tentacles")
|
2021-01-20 16:44:27 +00:00
|
|
|
pico_add_extra_outputs(kitchen_sink)
|
|
|
|
|
2021-12-08 18:05:49 +00:00
|
|
|
add_executable(kitchen_sink_extra_stdio ${CMAKE_CURRENT_LIST_DIR}/kitchen_sink.c)
|
2021-10-25 13:56:25 +00:00
|
|
|
if (COMMAND suppress_tinyusb_warnings)
|
|
|
|
# Explicitly suppress warnings in TinyUSB files which have them (this has to be done
|
|
|
|
# from the project that uses them per CMake "feature"). Note the function comes from
|
|
|
|
# TinyUSB itself, so we have to guard against TinyUSB not being present with the above if
|
|
|
|
suppress_tinyusb_warnings()
|
|
|
|
endif()
|
2022-06-30 04:03:32 +00:00
|
|
|
if (TARGET pico_lwip)
|
|
|
|
set_source_files_properties(
|
|
|
|
${PICO_LWIP_PATH}/src/core/ipv4/ip4_frag.c
|
|
|
|
PROPERTIES
|
|
|
|
COMPILE_FLAGS "-Wno-null-dereference")
|
|
|
|
|
|
|
|
endif()
|
2021-10-25 13:33:42 +00:00
|
|
|
target_link_libraries(kitchen_sink_extra_stdio kitchen_sink_libs kitchen_sink_options)
|
2021-01-20 16:44:27 +00:00
|
|
|
pico_add_extra_outputs(kitchen_sink_extra_stdio)
|
|
|
|
pico_enable_stdio_usb(kitchen_sink_extra_stdio 1)
|
|
|
|
pico_enable_stdio_semihosting(kitchen_sink_extra_stdio 1)
|
|
|
|
|
2021-12-08 18:05:49 +00:00
|
|
|
add_executable(kitchen_sink_copy_to_ram ${CMAKE_CURRENT_LIST_DIR}/kitchen_sink.c)
|
2021-01-20 16:44:27 +00:00
|
|
|
pico_set_binary_type(kitchen_sink_copy_to_ram copy_to_ram)
|
|
|
|
target_link_libraries(kitchen_sink_copy_to_ram kitchen_sink_libs kitchen_sink_options)
|
|
|
|
pico_add_extra_outputs(kitchen_sink_copy_to_ram)
|
|
|
|
|
2021-12-08 18:05:49 +00:00
|
|
|
add_executable(kitchen_sink_no_flash ${CMAKE_CURRENT_LIST_DIR}/kitchen_sink.c)
|
2021-01-20 16:44:27 +00:00
|
|
|
pico_set_binary_type(kitchen_sink_no_flash no_flash)
|
|
|
|
target_link_libraries(kitchen_sink_no_flash kitchen_sink_libs kitchen_sink_options)
|
2021-02-02 17:57:11 +00:00
|
|
|
pico_add_extra_outputs(kitchen_sink_no_flash)
|
2021-10-25 13:33:42 +00:00
|
|
|
|
2021-12-08 18:05:49 +00:00
|
|
|
add_executable(kitchen_sink_cpp ${CMAKE_CURRENT_LIST_DIR}/kitchen_sink_cpp.cpp)
|
|
|
|
target_link_libraries(kitchen_sink_cpp kitchen_sink_libs kitchen_sink_options)
|
|
|
|
pico_set_program_name(kitchen_sink_cpp "Wombat tentacles CPP")
|
|
|
|
pico_add_extra_outputs(kitchen_sink_cpp)
|
2022-06-30 04:03:32 +00:00
|
|
|
|
|
|
|
if (TARGET pico_cyw43_arch)
|
|
|
|
# for lwipopts.h
|
|
|
|
add_executable(kitchen_sink_lwip_poll ${CMAKE_CURRENT_LIST_DIR}/kitchen_sink.c)
|
|
|
|
target_link_libraries(kitchen_sink_lwip_poll kitchen_sink_libs kitchen_sink_options)
|
|
|
|
pico_add_extra_outputs(kitchen_sink_lwip_poll)
|
|
|
|
target_link_libraries(kitchen_sink_lwip_poll
|
|
|
|
pico_cyw43_arch_lwip_poll)
|
|
|
|
# for lwipopts.h
|
|
|
|
target_include_directories(kitchen_sink_lwip_poll PRIVATE
|
|
|
|
${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
|
|
|
|
add_executable(kitchen_sink_lwip_background ${CMAKE_CURRENT_LIST_DIR}/kitchen_sink.c)
|
|
|
|
target_link_libraries(kitchen_sink_lwip_background kitchen_sink_libs kitchen_sink_options)
|
|
|
|
pico_add_extra_outputs(kitchen_sink_lwip_background)
|
|
|
|
target_link_libraries(kitchen_sink_lwip_background
|
|
|
|
pico_cyw43_arch_lwip_threadsafe_background)
|
|
|
|
# for lwipopts.h
|
|
|
|
target_include_directories(kitchen_sink_lwip_background PRIVATE
|
|
|
|
${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
|
2022-10-17 16:34:10 +00:00
|
|
|
if (TARGET pico_lwip_mbedtls)
|
|
|
|
target_link_libraries(kitchen_sink_lwip_poll pico_lwip_mbedtls)
|
|
|
|
target_link_libraries(kitchen_sink_lwip_background pico_lwip_mbedtls)
|
|
|
|
endif()
|
|
|
|
if (TARGET pico_mbedtls)
|
|
|
|
target_link_libraries(kitchen_sink_lwip_poll pico_mbedtls)
|
|
|
|
target_link_libraries(kitchen_sink_lwip_background pico_mbedtls)
|
|
|
|
suppress_mbedtls_warnings()
|
|
|
|
endif()
|
2022-06-30 04:03:32 +00:00
|
|
|
endif()
|