summaryrefslogtreecommitdiff
path: root/bsp/at32/tools
diff options
context:
space:
mode:
authorluhuadong <[email protected]>2020-04-22 16:58:10 +0800
committerluhuadong <[email protected]>2020-04-22 16:58:10 +0800
commite1bd3673fd428ffbfd04d2f51a1a9be6fbfe832d (patch)
tree8a733f84763476388ba3a5587c45cf0c763c9ce0 /bsp/at32/tools
parent964cbe612adbe749b4cd3c3ef48eafe72a571254 (diff)
[AT32 BSP] do bsp special dist handle
Diffstat (limited to 'bsp/at32/tools')
-rw-r--r--bsp/at32/tools/sdk_dist.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/bsp/at32/tools/sdk_dist.py b/bsp/at32/tools/sdk_dist.py
new file mode 100644
index 0000000000..01ff930b20
--- /dev/null
+++ b/bsp/at32/tools/sdk_dist.py
@@ -0,0 +1,19 @@
+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):
+ from mkdist import bsp_copy_files
+ import rtconfig
+
+ dist_dir = os.path.join(BSP_ROOT, 'dist', os.path.basename(BSP_ROOT))
+ library_path = os.path.join(os.path.dirname(BSP_ROOT), 'Libraries')
+ library_dir = os.path.join(dist_dir, 'Libraries')
+ print("=> copy bsp drivers")
+ bsp_copy_files(os.path.join(library_path, 'rt_drivers'), os.path.join(library_dir, 'rt_drivers'))
+ print("=> copy bsp library")
+ bsp_copy_files(os.path.join(library_path, rtconfig.BSP_LIBRARY_TYPE), os.path.join(library_dir, rtconfig.BSP_LIBRARY_TYPE))
+ shutil.copyfile(os.path.join(library_path, 'Kconfig'), os.path.join(library_dir, 'Kconfig'))