# https://github.com/Infineon/mtb-example-xmc-flash-bmi/tree/master/COMPONENT_CUSTOM_DESIGN_MODUS
xmc_check_bsp(
  KIT_XMC47_RELAX_V1
)

# Custom linker script for GCC only
if(NOT ${TOOLCHAIN} STREQUAL GCC)
  return()
endif()

project(flash-bmi)

xmc_load_application(
  NAME mtb-example-xmc-flash-bmi
  VERSION 1.0.0
)

xmc_add_executable(
  SOURCES
    ${APP_DIR}/main.c
    ${APP_DIR}/retarget_io.h
    ${APP_DIR}/retarget_io.c
    ${APP_DIR}/ring_buffer.h
    ${APP_DIR}/ring_buffer.c
    ${APP_DIR}/shell.h
    ${APP_DIR}/shell.c
  LINKER_SCRIPT
    ${APP_DIR}/XMC4700x2048.ld
  DESIGN_MODUS
    ${APP_DIR}/COMPONENT_CUSTOM_DESIGN_MODUS/TARGET_${BSP_NAME}/design.modus
)
