2024-07-01 01:10:07 +08:00
|
|
|
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
|
|
|
# BASED ON c:\BLACKBOARD\AAA_UNITS\AAA_HONORS\firmware
|
|
|
|
|
|
|
|
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>>:STM32L476xx>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:USE_HAL_DRIVER>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:STM32L476xx>"
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(
|
|
|
|
${TARGET_NAME} PRIVATE
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Core\\Inc>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\STM32L4xx_HAL_Driver\\Inc>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\STM32L4xx_HAL_Driver\\Inc\\Legacy>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\CMSIS\\Device\\ST\\STM32L4xx\\Include>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\CMSIS\\Include>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/FATFS\\Target>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/FATFS\\App>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Middlewares\\Third_Party\\FatFs\\src>"
|
2024-07-01 03:32:52 +08:00
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/USB_COMPOSITE>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/USB_COMPOSITE\\App>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/USB_COMPOSITE\\Class\\CDC_ACM\\Inc>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/USB_COMPOSITE\\Class\\COMPOSITE\\Inc>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/USB_COMPOSITE\\Class\\MSC\\Inc>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/USB_COMPOSITE\\Core\\Inc>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/USB_COMPOSITE\\Target>"
|
2024-07-03 17:27:23 +08:00
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Middlewares\\Third_Party\\FreeRTOS\\Source\\include>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Middlewares\\Third_Party\\FreeRTOS\\Source\\CMSIS_RTOS>"
|
|
|
|
"$<$<AND:$<CONFIG:Debug>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Middlewares\\Third_Party\\FreeRTOS\\Source\\portable\\GCC\\ARM_CM4F>"
|
2024-07-01 01:10:07 +08:00
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Core\\Inc>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\STM32L4xx_HAL_Driver\\Inc>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\STM32L4xx_HAL_Driver\\Inc\\Legacy>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\CMSIS\\Device\\ST\\STM32L4xx\\Include>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Drivers\\CMSIS\\Include>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/FATFS\\Target>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/FATFS\\App>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Middlewares\\Third_Party\\FatFs\\src>"
|
2024-07-01 03:32:52 +08:00
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/USB_COMPOSITE\\App>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/USB_COMPOSITE\\Class\\CDC_ACM\\Inc>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/USB_COMPOSITE\\Class\\COMPOSITE\\Inc>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/USB_COMPOSITE\\Class\\MSC\\Inc>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/USB_COMPOSITE\\Core\\Inc>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/USB_COMPOSITE\\Target>"
|
2024-07-03 17:27:23 +08:00
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Middlewares\\Third_Party\\FreeRTOS\\Source\\include>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Middlewares\\Third_Party\\FreeRTOS\\Source\\CMSIS_RTOS>"
|
|
|
|
"$<$<AND:$<NOT:$<CONFIG:Debug>>,$<COMPILE_LANGUAGE:C>>:${PROJECT_SOURCE_DIR}/Middlewares\\Third_Party\\FreeRTOS\\Source\\portable\\GCC\\ARM_CM4F>"
|
2024-07-01 01:10:07 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
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}/STM32L476RETX_FLASH.ld>"
|
|
|
|
"$<$<NOT:$<CONFIG:Debug>>:${PROJECT_SOURCE_DIR}/STM32L476RETX_FLASH.ld>"
|
|
|
|
)
|
|
|
|
|
|
|
|
target_sources(
|
|
|
|
${TARGET_NAME} PRIVATE
|
2024-07-03 17:27:23 +08:00
|
|
|
"Core\\Src\\entrypoint.c"
|
|
|
|
"Core\\Src\\freertos.c"
|
|
|
|
"Core\\Src\\logging.c"
|
2024-07-01 01:10:07 +08:00
|
|
|
"Core\\Src\\main.c"
|
2024-07-01 05:47:01 +08:00
|
|
|
"Core\\Src\\ringbuffer.c"
|
2024-07-01 01:10:07 +08:00
|
|
|
"Core\\Src\\stm32l4xx_hal_msp.c"
|
|
|
|
"Core\\Src\\stm32l4xx_hal_timebase_tim.c"
|
|
|
|
"Core\\Src\\stm32l4xx_it.c"
|
|
|
|
"Core\\Src\\syscalls.c"
|
|
|
|
"Core\\Src\\sysmem.c"
|
|
|
|
"Core\\Src\\system_stm32l4xx.c"
|
|
|
|
"Core\\Startup\\startup_stm32l476retx.s"
|
|
|
|
"FATFS\\App\\fatfs.c"
|
|
|
|
"FATFS\\Target\\bsp_driver_mmc.c"
|
|
|
|
"FATFS\\Target\\user_diskio.c"
|
2024-07-01 03:32:52 +08:00
|
|
|
"USB_COMPOSITE\\App\\usb_device.c"
|
|
|
|
"USB_COMPOSITE\\App\\usbd_cdc_acm_if.c"
|
|
|
|
"USB_COMPOSITE\\App\\usbd_desc.c"
|
|
|
|
"USB_COMPOSITE\\App\\usbd_msc_if.c"
|
|
|
|
"USB_COMPOSITE\\Class\\CDC_ACM\\Src\\usbd_cdc_acm.c"
|
|
|
|
"USB_COMPOSITE\\Class\\COMPOSITE\\Src\\usbd_composite.c"
|
|
|
|
"USB_COMPOSITE\\Class\\MSC\\Src\\usbd_msc_bot.c"
|
|
|
|
"USB_COMPOSITE\\Class\\MSC\\Src\\usbd_msc_data.c"
|
|
|
|
"USB_COMPOSITE\\Class\\MSC\\Src\\usbd_msc_scsi.c"
|
|
|
|
"USB_COMPOSITE\\Class\\MSC\\Src\\usbd_msc.c"
|
|
|
|
"USB_COMPOSITE\\Core\\Src\\usbd_core.c"
|
|
|
|
"USB_COMPOSITE\\Core\\Src\\usbd_ctlreq.c"
|
|
|
|
"USB_COMPOSITE\\Core\\Src\\usbd_ioreq.c"
|
|
|
|
"USB_COMPOSITE\\Target\\usbd_conf.c"
|
2024-07-01 01:10:07 +08:00
|
|
|
"Middlewares\\Third_Party\\FatFs\\src\\diskio.c"
|
|
|
|
"Middlewares\\Third_Party\\FatFs\\src\\ff_gen_drv.c"
|
|
|
|
"Middlewares\\Third_Party\\FatFs\\src\\ff.c"
|
|
|
|
"Middlewares\\Third_Party\\FatFs\\src\\option\\ccsbcs.c"
|
|
|
|
"Middlewares\\Third_Party\\FatFs\\src\\option\\syscall.c"
|
2024-07-03 17:27:23 +08:00
|
|
|
"Middlewares\\Third_Party\\FreeRTOS\\Source\\CMSIS_RTOS\\cmsis_os.c"
|
|
|
|
"Middlewares\\Third_Party\\FreeRTOS\\Source\\croutine.c"
|
|
|
|
"Middlewares\\Third_Party\\FreeRTOS\\Source\\event_groups.c"
|
|
|
|
"Middlewares\\Third_Party\\FreeRTOS\\Source\\list.c"
|
|
|
|
"Middlewares\\Third_Party\\FreeRTOS\\Source\\portable\\GCC\\ARM_CM4F\\port.c"
|
|
|
|
"Middlewares\\Third_Party\\FreeRTOS\\Source\\portable\\MemMang\\heap_4.c"
|
|
|
|
"Middlewares\\Third_Party\\FreeRTOS\\Source\\queue.c"
|
|
|
|
"Middlewares\\Third_Party\\FreeRTOS\\Source\\stream_buffer.c"
|
|
|
|
"Middlewares\\Third_Party\\FreeRTOS\\Source\\tasks.c"
|
|
|
|
"Middlewares\\Third_Party\\FreeRTOS\\Source\\timers.c"
|
2024-07-01 01:10:07 +08:00
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_can.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_cortex.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_crc_ex.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_crc.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_dma_ex.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_dma.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_exti.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_flash_ex.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_flash_ramfunc.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_flash.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_gpio.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_i2c_ex.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_i2c.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_mmc_ex.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_mmc.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_pcd_ex.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_pcd.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_pwr_ex.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_pwr.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_rcc_ex.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_rcc.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_spi_ex.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_spi.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_tim_ex.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_tim.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_uart_ex.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal_uart.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_hal.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_ll_sdmmc.c"
|
|
|
|
"Drivers\\STM32L4xx_HAL_Driver\\Src\\stm32l4xx_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()
|