# https://github.com/Infineon/mtb-example-psoc6-usb-msc-filesystem-freertos/tree/master/COMPONENT_CUSTOM_DESIGN_MODUS
psoc6_check_bsp(
  CY8CPROTO-062-4343W
  CY8CKIT-062S2-43012
  CY8CKIT-064B0S2-4343W
)

project(usb-msc-filesystem-freertos)

psoc6_load_application(
  NAME mtb-example-psoc6-usb-msc-filesystem-freertos
  VERSION 2.1.0
)
psoc6_add_executable(
  SOURCES
    ${APP_DIR}/source/main.c
    ${APP_DIR}/source/audio_fs.h
    ${APP_DIR}/source/audio_fs.c
    ${APP_DIR}/source/audio_in.h
    ${APP_DIR}/source/audio_in.c
    ${APP_DIR}/source/rtos.h
    ${APP_DIR}/source/sd_card.h
    ${APP_DIR}/source/sd_card.c
    ${APP_DIR}/source/usb_comm.h
    ${APP_DIR}/source/usb_comm.c
    ${APP_DIR}/source/usb_scsi.h
    ${APP_DIR}/source/usb_scsi.c
    ${APP_DIR}/usb_msc/cy_usb_dev_msc.h
    ${APP_DIR}/usb_msc/cy_usb_dev_msc.c
    # TODO: lib/fatfs.cmake
    ${APP_DIR}/fatfs/diskio.h
    ${APP_DIR}/fatfs/diskio.c
    ${APP_DIR}/fatfs/ff.h
    ${APP_DIR}/fatfs/ff.c
    ${APP_DIR}/fatfs/ffconf.h
    ${APP_DIR}/fatfs/ffsystem.c
    ${APP_DIR}/fatfs/ffunicode.c
  INCLUDE_DIRS
    ${APP_DIR}/source
    ${APP_DIR}/usb_msc
    ${APP_DIR}/fatfs
  LINK_LIBRARIES
    usbdev
    mtb-hal-cat1
    retarget-io
  DESIGN_MODUS
    ${APP_DIR}/COMPONENT_CUSTOM_DESIGN_MODUS/TARGET_${BSP_NAME}/design.modus
  DESIGN_USBDEV
    ${APP_DIR}/COMPONENT_CUSTOM_DESIGN_MODUS/TARGET_${BSP_NAME}/design.cyusbdev
)
