set(STM32_FAMILY stm32h7xx)

file(GLOB STM32_FAMILY_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/${STM32_FAMILY}/*)
file(GLOB STM32_VARIANT_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/${STM32_VARIANT}/*.c")
file(GLOB STM32_VARIANT_HEADERS
	${CMAKE_CURRENT_SOURCE_DIR}/include/stm32/*${STM32_VARIANT}.h
	${CMAKE_CURRENT_SOURCE_DIR}/include/stm32/cmsis/${STM32_FAMILY}.h
	${CMAKE_CURRENT_SOURCE_DIR}/include/stm32/cmsis/${STM32_VARIANT}.h)
file(GLOB STM32_LDSCRIPT_SOURCES
	"${CMAKE_CURRENT_SOURCE_DIR}/ldscript/stm32h7*"
	"${CMAKE_CURRENT_SOURCE_DIR}/ldscript/stm32-common*")

set(SOS_SOURCELIST ${SHARED_SOURCELIST} ${STM32_FAMILY_SOURCES} ${STM32_VARIANT_SOURCES} ${STM32_VARIANT_HEADERS} ${STM32_LDSCRIPT_SOURCES})
set(SOS_DEFINITIONS USE_HAL_DRIVER=1 __${STM32_VARIANT} ${STM32_VARIANT_DEFINE}=1)
set(SOS_INCLUDE_DIRECTORIES include include/stm32 src src/${STM32_FAMILY} ${STM32_FAMILY}  include/stm32/cmsis)

add_targets()

