package platform.stm32.f3.stm32f3_discovery

@BuildArtifactPath(cppflags="-DSTM32F303xC")
static module stm32f3_discovery_conf extends third_party.bsp.stmf3cube.stm32f3_conf {
	@IncludeExport(path="")
	source "stm32f3xx_hal_conf.h"
}

@Build(stage=1)
@BuildDepends(stm32f3_discovery_conf)
@BuildDepends(third_party.bsp.stmf3cube.cube)
@BuildArtifactPath(cppflags=" $(addprefix -I$(EXTERNAL_BUILD_DIR)/third_party/bsp/stmf3cube/cube/STM32CubeF3-1.11.0/,Drivers/BSP/STM32F3-Discovery)")
static module bsp extends third_party.bsp.st_bsp_api {
	source "clock_config.c"

	@AddPrefix("^BUILD/extbld/third_party/bsp/stmf3cube/cube/STM32CubeF3-1.11.0")
	source "Projects/STM32F3-Discovery/Examples/BSP/Src/system_stm32f3xx.c"

	@AddPrefix("^BUILD/extbld/third_party/bsp/stmf3cube/cube/STM32CubeF3-1.11.0/Drivers/BSP/STM32F3-Discovery/")
	source
		"stm32f3_discovery.c",
		"stm32f3_discovery_accelerometer.c",
		"stm32f3_discovery_gyroscope.c"

	@NoRuntime depends third_party.bsp.stmf3cube.cube
	@NoRuntime depends stm32f3_discovery_conf
	@NoRuntime depends platform.stm32.stm32cube_compat
	@NoRuntime depends third_party.bsp.stmf3cube.components
}
