summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/stlink/Makefile32
-rw-r--r--target/arm/systems/st-stm32f407-discovery2
-rw-r--r--target/config/Config.in.tools4
3 files changed, 37 insertions, 1 deletions
diff --git a/package/stlink/Makefile b/package/stlink/Makefile
new file mode 100644
index 000000000..a5c51d7f3
--- /dev/null
+++ b/package/stlink/Makefile
@@ -0,0 +1,32 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= stlink
+PKG_VERSION:= 04dc7ead42f99d80696cd12496ee2299428675e7
+PKG_RELEASE:= 1
+PKG_DESCR:= st flash utility
+PKG_SECTION:= dev/tools
+HOST_BUILDDEP:= cmake-host
+PKG_SITES:= https://github.com/texane/stlink.git
+
+PKG_CFLINE_STLINK:= depends on ADK_HOST_ONLY
+
+include $(ADK_TOPDIR)/mk/host.mk
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,STLINK,stlink,$(PKG_VERSION)-${PKG_RELEASE}))
+
+HOST_STYLE:= cmake
+
+host-build:
+ (cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET})
+
+hostpost-install:
+ (cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ DESTDIR=$(STAGING_HOST_DIR) ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET})
+
+include ${ADK_TOPDIR}/mk/host-bottom.mk
+include ${ADK_TOPDIR}/mk/pkg-bottom.mk
diff --git a/target/arm/systems/st-stm32f407-discovery b/target/arm/systems/st-stm32f407-discovery
index ceff115f5..d2b269258 100644
--- a/target/arm/systems/st-stm32f407-discovery
+++ b/target/arm/systems/st-stm32f407-discovery
@@ -5,7 +5,7 @@ config ADK_TARGET_SYSTEM_ST_STM32F407_DISCOVERY
select ADK_TARGET_CPU_ARM_CORTEX_M4
select ADK_TARGET_ARCH_ARM_WITH_THUMB
select ADK_TARGET_WITH_SERIAL
- select ADK_HOST_BUILD_OPENOCD
+ select ADK_HOST_BUILD_STLINK
select ADK_FROSTED_ARCH_STM32F4
select ADK_FROSTED_ARCH_STM32F407_XG
select ADK_FROSTED_FLASH_SIZE_1MB
diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools
index 3ca583294..074989fc9 100644
--- a/target/config/Config.in.tools
+++ b/target/config/Config.in.tools
@@ -120,6 +120,10 @@ config ADK_HOST_BUILD_SED
bool
default n
+config ADK_HOST_BUILD_STLINK
+ bool
+ default n
+
config ADK_HOST_BUILD_TAR
bool
default n