package third_party.bsp

@Build(script="$(EXTERNAL_MAKE) download extract patch")
@BuildArtifactPath(cppflags='''$(addprefix -I$(abspath $(EXTERNAL_BUILD_DIR))third_party/bsp/st_discovery_vl/an3268/stm32vldiscovery_package/Libraries/,
				CMSIS/CM3/CoreSupport/
				CMSIS/CM3/DeviceSupport/ST/STM32F10x
				STM32F10x_StdPeriph_Driver/inc/)''')
static module st_discovery_vl {

	@IncludePath("$(EXTERNAL_BUILD_DIR)/third_party/bsp/st_discovery_vl/an3268/stm32vldiscovery_package/Libraries/CMSIS/CM3/CoreSupport/")
	@AddPrefix("^BUILD/extbld/^MOD_PATH/an3268/stm32vldiscovery_package/Libraries")
	source "CMSIS/CM3/CoreSupport/core_cm3.c",
		"CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c"

	@DefineMacro("USE_STDPERIPH_DRIVER")
	@IncludePath("$(EXTERNAL_BUILD_DIR)/third_party/bsp/st_discovery_vl/an3268/stm32vldiscovery_package/Libraries/CMSIS/CM3/CoreSupport/")
	@IncludePath("$(EXTERNAL_BUILD_DIR)/third_party/bsp/st_discovery_vl/an3268/stm32vldiscovery_package/Libraries/STM32F10x_StdPeriph_Driver/inc/")
	@IncludePath("$(EXTERNAL_BUILD_DIR)/third_party/bsp/st_discovery_vl/an3268/stm32vldiscovery_package/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x/")
	@IncludePath("$(ROOT_DIR)/third-party/bsp/st_discovery_vl/")
	@AddPrefix("^BUILD/extbld/^MOD_PATH/an3268/stm32vldiscovery_package/Libraries/STM32F10x_StdPeriph_Driver/src")
	source "misc.c",
		"stm32f10x_adc.c",
		"stm32f10x_bkp.c",
		"stm32f10x_can.c",
		"stm32f10x_cec.c",
		"stm32f10x_crc.c",
		"stm32f10x_dac.c",
		"stm32f10x_dbgmcu.c",
		"stm32f10x_dma.c",
		"stm32f10x_exti.c",
		"stm32f10x_flash.c",
		"stm32f10x_fsmc.c",
		"stm32f10x_gpio.c",
		"stm32f10x_i2c.c",
		"stm32f10x_iwdg.c",
		"stm32f10x_pwr.c",
		"stm32f10x_rcc.c",
		"stm32f10x_rtc.c",
		"stm32f10x_sdio.c",
		"stm32f10x_spi.c",
		"stm32f10x_tim.c",
		"stm32f10x_usart.c",
		"stm32f10x_wwdg.c"

}
