cmake_minimum_required(VERSION 3.13) set(PICO_CXX_ENABLE_EXCEPTIONS 1) set(CMAKE_CXX_STANDARD 14) include(pico_sdk_import.cmake) project(atto-filesystem) pico_sdk_init() set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DRELEASE -DNDEBUG") add_executable(atto-filesystem errors.cpp Device/SSFS.cpp Device/Node.cpp Device/RawBlockDevice.cpp Device/BlockDevice.cpp Device/SerialDevice.cpp Device/I2cEeprom.cpp Device/QspiFlash.cpp Device/BufferedBlockDevice.cpp Device/SDcard.cpp Device/CSD.cpp Device/crc.cpp main.cpp) target_include_directories(atto-filesystem PRIVATE ${PROJECT_SOURCE_DIR}) # if there is a PIO assembler file: # pico_generate_pio_header(atto-filesystem ${CMAKE_CURRENT_LIST_DIR}/MYPIOASMFILE.pio) pico_enable_stdio_usb(atto-filesystem 0) pico_enable_stdio_uart(atto-filesystem 1) # Pull in libraries: (whatever you need, this also adds the header file search path!) target_link_libraries(atto-filesystem pico_stdlib) target_link_libraries(atto-filesystem hardware_rtc pico_multicore hardware_pio hardware_dma) target_link_libraries(atto-filesystem hardware_i2c hardware_adc hardware_irq hardware_pwm) target_link_libraries(atto-filesystem hardware_flash hardware_spi) # create map/bin/hex/uf2 file etc. pico_add_extra_outputs(atto-filesystem) # add url via pico_set_program_url # example_auto_set_url(atto-filesystem)