|
5 | 5 | sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools')) |
6 | 6 |
|
7 | 7 | # BSP dist function |
8 | | -def dist_do_building(BSP_ROOT): |
| 8 | +def dist_do_building(BSP_ROOT, dist_dir=None): |
9 | 9 | from mkdist import bsp_copy_files |
10 | 10 | import rtconfig |
11 | 11 |
|
12 | | - dist_dir = os.path.join(BSP_ROOT, 'dist', os.path.basename(BSP_ROOT)) |
| 12 | + if dist_dir is None: |
| 13 | + dist_dir = os.path.join(BSP_ROOT, 'dist', os.path.basename(BSP_ROOT)) |
| 14 | + |
| 15 | + print("=> copy imxrt bsp library") |
13 | 16 | library_path = os.path.join(os.path.dirname(BSP_ROOT), 'libraries') |
14 | 17 | library_dir = os.path.join(dist_dir, 'libraries') |
| 18 | + bsp_copy_files(os.path.join(library_path, rtconfig.BSP_LIBRARY_TYPE), |
| 19 | + os.path.join(library_dir, rtconfig.BSP_LIBRARY_TYPE)) |
| 20 | + |
15 | 21 | print("=> copy bsp drivers") |
16 | 22 | bsp_copy_files(os.path.join(library_path, 'drivers'), os.path.join(library_dir, 'drivers')) |
17 | | - print("=> copy bsp library") |
18 | | - bsp_copy_files(os.path.join(library_path, rtconfig.BSP_LIBRARY_TYPE), os.path.join(library_dir, rtconfig.BSP_LIBRARY_TYPE)) |
19 | 23 | shutil.copyfile(os.path.join(library_path, 'Kconfig'), os.path.join(library_dir, 'Kconfig')) |
0 commit comments