summaryrefslogtreecommitdiff
path: root/bsp/gd32/tools
diff options
context:
space:
mode:
authorOuxiaolong <[email protected]>2021-09-02 22:38:47 +0800
committerOuxiaolong <[email protected]>2021-09-02 22:38:47 +0800
commitd55f310d786a3ecc33a41f40c23ea9c58a198fdb (patch)
tree36e36380e1e772ce19b1b9b225e90b44352e0293 /bsp/gd32/tools
parentdca7dcb42a44249abbe6c36ce2a69355e60d1f79 (diff)
add gd32407v-start
Diffstat (limited to 'bsp/gd32/tools')
-rw-r--r--bsp/gd32/tools/sdk_dist.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/bsp/gd32/tools/sdk_dist.py b/bsp/gd32/tools/sdk_dist.py
new file mode 100644
index 0000000000..cc5ccce7c6
--- /dev/null
+++ b/bsp/gd32/tools/sdk_dist.py
@@ -0,0 +1,22 @@
+import os
+import sys
+import shutil
+
+cwd_path = os.getcwd()
+sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools'))
+
+
+# BSP dist function
+def dist_do_building(BSP_ROOT, dist_dir):
+ from mkdist import bsp_copy_files
+ import rtconfig
+
+ print("=> copy gd32 bsp library")
+ library_dir = os.path.join(dist_dir, 'libraries')
+ library_path = os.path.join(os.path.dirname(BSP_ROOT), 'libraries')
+ bsp_copy_files(os.path.join(library_path, rtconfig.BSP_LIBRARY_TYPE),
+ os.path.join(library_dir, rtconfig.BSP_LIBRARY_TYPE))
+
+ print("=> copy bsp drivers")
+ bsp_copy_files(os.path.join(library_path, 'HAL_Drivers'), os.path.join(library_dir, 'HAL_Drivers'))
+ shutil.copyfile(os.path.join(library_path, 'Kconfig'), os.path.join(library_dir, 'Kconfig'))