mirror of
https://github.com/peter-tanner/tinyusb-cdc-stm32f302c8-stm32-hal-minimal.git
synced 2024-11-30 09:00:15 +08:00
190 lines
9.2 KiB
CMake
190 lines
9.2 KiB
CMake
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
|
# BASED ON c:\Users\Peter\Documents\GITHUB\tinyusb-stm32f302c8
|
|
|
|
function(add_st_target_properties TARGET_NAME)
|
|
|
|
target_compile_definitions(
|
|
${TARGET_NAME} PRIVATE
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:ASM>>:DEBUG>"
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:DEBUG>"
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:USE_HAL_DRIVER>"
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:STM32F302x8>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:USE_HAL_DRIVER>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:STM32F302x8>"
|
|
)
|
|
|
|
target_include_directories(
|
|
${TARGET_NAME} PRIVATE
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Inc>"
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\STM32F3xx_HAL_Driver\\Inc>"
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\STM32F3xx_HAL_Driver\\Inc\\Legacy>"
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\CMSIS\\Device\\ST\\STM32F3xx\\Include>"
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\CMSIS\\Include>"
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Src/tinyusb/src>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Inc>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\STM32F3xx_HAL_Driver\\Inc>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\STM32F3xx_HAL_Driver\\Inc\\Legacy>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\CMSIS\\Device\\ST\\STM32F3xx\\Include>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\CMSIS\\Include>"
|
|
)
|
|
|
|
target_compile_options(
|
|
${TARGET_NAME} PRIVATE
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:ASM>>:-g3>"
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:-g3>"
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:CXX>>:-g3>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:ASM>>:-g0>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:-g0>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:CXX>>:-g0>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:-Os>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:CXX>>:-Os>"
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:>"
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:CXX>>:>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:>"
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:CXX>>:>"
|
|
"$<$<CONFIG:Debug>:-mcpu=cortex-m4>"
|
|
"$<$<CONFIG:Debug>:-mfpu=fpv4-sp-d16>"
|
|
"$<$<CONFIG:Debug>:-mfloat-abi=hard>"
|
|
"$<$<NOT:$<CONFIG:Debug>>:-mcpu=cortex-m4>"
|
|
"$<$<NOT:$<CONFIG:Debug>>:-mfpu=fpv4-sp-d16>"
|
|
"$<$<NOT:$<CONFIG:Debug>>:-mfloat-abi=hard>"
|
|
)
|
|
|
|
target_link_libraries(
|
|
${TARGET_NAME} PRIVATE
|
|
)
|
|
|
|
target_link_directories(
|
|
${TARGET_NAME} PRIVATE
|
|
)
|
|
|
|
target_link_options(
|
|
${TARGET_NAME} PRIVATE
|
|
"$<$<CONFIG:Debug>:-mcpu=cortex-m4>"
|
|
"$<$<CONFIG:Debug>:-mfpu=fpv4-sp-d16>"
|
|
"$<$<CONFIG:Debug>:-mfloat-abi=hard>"
|
|
"$<$<NOT:$<CONFIG:Debug>>:-mcpu=cortex-m4>"
|
|
"$<$<NOT:$<CONFIG:Debug>>:-mfpu=fpv4-sp-d16>"
|
|
"$<$<NOT:$<CONFIG:Debug>>:-mfloat-abi=hard>"
|
|
-T
|
|
"$<$<CONFIG:Debug>:${PROJECT_SOURCE_DIR}/STM32F302C8TX_FLASH.ld>"
|
|
"$<$<NOT:$<CONFIG:Debug>>:${PROJECT_SOURCE_DIR}/STM32F302C8TX_FLASH.ld>"
|
|
)
|
|
|
|
target_sources(
|
|
${TARGET_NAME} PRIVATE
|
|
"Startup\\startup_stm32f302c8tx.s"
|
|
"Src\\main.c"
|
|
"Src\\stm32f3xx_hal_msp.c"
|
|
"Src\\stm32f3xx_it.c"
|
|
"Src\\syscalls.c"
|
|
"Src\\sysmem.c"
|
|
"Src\\system_stm32f3xx.c"
|
|
"Src\\tinyusb\\src\\class\\audio\\audio_device.c"
|
|
"Src\\tinyusb\\src\\class\\bth\\bth_device.c"
|
|
"Src\\tinyusb\\src\\class\\cdc\\cdc_device.c"
|
|
"Src\\tinyusb\\src\\class\\cdc\\cdc_host.c"
|
|
"Src\\tinyusb\\src\\class\\cdc\\cdc_rndis_host.c"
|
|
"Src\\tinyusb\\src\\class\\dfu\\dfu_device.c"
|
|
"Src\\tinyusb\\src\\class\\dfu\\dfu_rt_device.c"
|
|
"Src\\tinyusb\\src\\class\\hid\\hid_device.c"
|
|
"Src\\tinyusb\\src\\class\\hid\\hid_host.c"
|
|
"Src\\tinyusb\\src\\class\\midi\\midi_device.c"
|
|
"Src\\tinyusb\\src\\class\\msc\\msc_device.c"
|
|
"Src\\tinyusb\\src\\class\\msc\\msc_host.c"
|
|
"Src\\tinyusb\\src\\class\\net\\ecm_rndis_device.c"
|
|
"Src\\tinyusb\\src\\class\\net\\ncm_device.c"
|
|
"Src\\tinyusb\\src\\class\\usbtmc\\usbtmc_device.c"
|
|
"Src\\tinyusb\\src\\class\\vendor\\vendor_device.c"
|
|
"Src\\tinyusb\\src\\class\\vendor\\vendor_host.c"
|
|
"Src\\tinyusb\\src\\class\\video\\video_device.c"
|
|
"Src\\tinyusb\\src\\common\\tusb_fifo.c"
|
|
"Src\\tinyusb\\src\\device\\usbd_control.c"
|
|
"Src\\tinyusb\\src\\device\\usbd.c"
|
|
"Src\\tinyusb\\src\\host\\hub.c"
|
|
"Src\\tinyusb\\src\\host\\usbh.c"
|
|
"Src\\tinyusb\\src\\portable\\analog\\max3421\\hcd_max3421.c"
|
|
"Src\\tinyusb\\src\\portable\\bridgetek\\ft9xx\\dcd_ft9xx.c"
|
|
"Src\\tinyusb\\src\\portable\\chipidea\\ci_fs\\dcd_ci_fs.c"
|
|
"Src\\tinyusb\\src\\portable\\chipidea\\ci_hs\\dcd_ci_hs.c"
|
|
"Src\\tinyusb\\src\\portable\\chipidea\\ci_hs\\hcd_ci_hs.c"
|
|
"Src\\tinyusb\\src\\portable\\dialog\\da146xx\\dcd_da146xx.c"
|
|
"Src\\tinyusb\\src\\portable\\ehci\\ehci.c"
|
|
"Src\\tinyusb\\src\\portable\\espressif\\esp32sx\\dcd_esp32sx.c"
|
|
"Src\\tinyusb\\src\\portable\\mentor\\musb\\dcd_musb.c"
|
|
"Src\\tinyusb\\src\\portable\\mentor\\musb\\hcd_musb.c"
|
|
"Src\\tinyusb\\src\\portable\\microchip\\pic\\dcd_pic.c"
|
|
"Src\\tinyusb\\src\\portable\\microchip\\pic32mz\\dcd_pic32mz.c"
|
|
"Src\\tinyusb\\src\\portable\\microchip\\samd\\dcd_samd.c"
|
|
"Src\\tinyusb\\src\\portable\\microchip\\samg\\dcd_samg.c"
|
|
"Src\\tinyusb\\src\\portable\\microchip\\samx7x\\dcd_samx7x.c"
|
|
"Src\\tinyusb\\src\\portable\\mindmotion\\mm32\\dcd_mm32f327x_otg.c"
|
|
"Src\\tinyusb\\src\\portable\\nordic\\nrf5x\\dcd_nrf5x.c"
|
|
"Src\\tinyusb\\src\\portable\\nuvoton\\nuc120\\dcd_nuc120.c"
|
|
"Src\\tinyusb\\src\\portable\\nuvoton\\nuc121\\dcd_nuc121.c"
|
|
"Src\\tinyusb\\src\\portable\\nuvoton\\nuc505\\dcd_nuc505.c"
|
|
"Src\\tinyusb\\src\\portable\\nxp\\khci\\dcd_khci.c"
|
|
"Src\\tinyusb\\src\\portable\\nxp\\khci\\hcd_khci.c"
|
|
"Src\\tinyusb\\src\\portable\\nxp\\lpc_ip3511\\dcd_lpc_ip3511.c"
|
|
"Src\\tinyusb\\src\\portable\\nxp\\lpc17_40\\dcd_lpc17_40.c"
|
|
"Src\\tinyusb\\src\\portable\\nxp\\lpc17_40\\hcd_lpc17_40.c"
|
|
"Src\\tinyusb\\src\\portable\\ohci\\ohci.c"
|
|
"Src\\tinyusb\\src\\portable\\raspberrypi\\pio_usb\\dcd_pio_usb.c"
|
|
"Src\\tinyusb\\src\\portable\\raspberrypi\\pio_usb\\hcd_pio_usb.c"
|
|
"Src\\tinyusb\\src\\portable\\raspberrypi\\rp2040\\dcd_rp2040.c"
|
|
"Src\\tinyusb\\src\\portable\\raspberrypi\\rp2040\\hcd_rp2040.c"
|
|
"Src\\tinyusb\\src\\portable\\raspberrypi\\rp2040\\rp2040_usb.c"
|
|
"Src\\tinyusb\\src\\portable\\renesas\\rusb2\\dcd_rusb2.c"
|
|
"Src\\tinyusb\\src\\portable\\renesas\\rusb2\\hcd_rusb2.c"
|
|
"Src\\tinyusb\\src\\portable\\renesas\\rusb2\\rusb2_common.c"
|
|
"Src\\tinyusb\\src\\portable\\sony\\cxd56\\dcd_cxd56.c"
|
|
"Src\\tinyusb\\src\\portable\\st\\stm32_fsdev\\dcd_stm32_fsdev.c"
|
|
"Src\\tinyusb\\src\\portable\\st\\typec\\typec_stm32.c"
|
|
"Src\\tinyusb\\src\\portable\\sunxi\\dcd_sunxi_musb.c"
|
|
"Src\\tinyusb\\src\\portable\\synopsys\\dwc2\\dcd_dwc2.c"
|
|
"Src\\tinyusb\\src\\portable\\template\\dcd_template.c"
|
|
"Src\\tinyusb\\src\\portable\\template\\hcd_template.c"
|
|
"Src\\tinyusb\\src\\portable\\ti\\msp430x5xx\\dcd_msp430x5xx.c"
|
|
"Src\\tinyusb\\src\\portable\\valentyusb\\eptri\\dcd_eptri.c"
|
|
"Src\\tinyusb\\src\\portable\\wch\\dcd_ch32_usbhs.c"
|
|
"Src\\tinyusb\\src\\tusb.c"
|
|
"Src\\tinyusb\\src\\typec\\usbc.c"
|
|
"Src\\usb_descriptors.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_cortex.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_dma.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_exti.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_flash_ex.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_flash.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_gpio.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_i2c_ex.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_i2c.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_pcd_ex.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_pcd.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_pwr_ex.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_pwr.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_rcc_ex.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_rcc.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_tim_ex.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal_tim.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_hal.c"
|
|
"Drivers\\STM32F3xx_HAL_Driver\\Src\\stm32f3xx_ll_usb.c"
|
|
)
|
|
|
|
add_custom_command(
|
|
TARGET ${TARGET_NAME} POST_BUILD
|
|
COMMAND ${CMAKE_SIZE} $<TARGET_FILE:${TARGET_NAME}>
|
|
)
|
|
|
|
add_custom_command(
|
|
TARGET ${TARGET_NAME} POST_BUILD
|
|
COMMAND ${CMAKE_OBJCOPY} -O ihex
|
|
$<TARGET_FILE:${TARGET_NAME}> ${TARGET_NAME}.hex
|
|
)
|
|
|
|
add_custom_command(
|
|
TARGET ${TARGET_NAME} POST_BUILD
|
|
COMMAND ${CMAKE_OBJCOPY} -O binary
|
|
$<TARGET_FILE:${TARGET_NAME}> ${TARGET_NAME}.bin
|
|
)
|
|
|
|
endfunction() |