summaryrefslogtreecommitdiff
path: root/bsp/at32/tools
diff options
context:
space:
mode:
authorluhuadong <[email protected]>2020-06-14 12:21:20 +0800
committerluhuadong <[email protected]>2020-06-14 12:21:20 +0800
commit4313ee6961d59aa95f8e016e7bd60d4a2cebd440 (patch)
tree15421995c7268610acce62848aa282e99fc56697 /bsp/at32/tools
parenteae89d14a0b2c6fb9945219e955e3a7ef7ba8789 (diff)
[BSP][AT32] fixed scons --dist
Diffstat (limited to 'bsp/at32/tools')
-rw-r--r--bsp/at32/tools/sdk_dist.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/bsp/at32/tools/sdk_dist.py b/bsp/at32/tools/sdk_dist.py
index 01ff930b20..4c36c9b6e3 100644
--- a/bsp/at32/tools/sdk_dist.py
+++ b/bsp/at32/tools/sdk_dist.py
@@ -5,15 +5,16 @@ 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):
+def dist_do_building(BSP_ROOT, dist_dir):
from mkdist import bsp_copy_files
import rtconfig
-
- dist_dir = os.path.join(BSP_ROOT, 'dist', os.path.basename(BSP_ROOT))
+
+ print("=> copy at32 bsp library")
+ library_dir = os.path.join(dist_dir, 'Libraries')
library_path = os.path.join(os.path.dirname(BSP_ROOT), 'Libraries')
- library_dir = os.path.join(dist_dir, '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, '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'))