1import os
2import sys
3import shutil
4
5cwd_path = os.getcwd()
6sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools'))
7
8
9# BSP dist function
10def dist_do_building(BSP_ROOT, dist_dir):
11    from mkdist import bsp_copy_files
12    import rtconfig
13
14    print("=> copy renesas bsp hal_drivers")
15    library_dir = os.path.join(dist_dir, 'libraries')
16    library_path = os.path.join(os.path.dirname(BSP_ROOT), 'libraries')
17
18    print("=> copy bsp drivers")
19    bsp_copy_files(os.path.join(library_path, 'HAL_Drivers'), os.path.join(library_dir, 'HAL_Drivers'))
20    shutil.copyfile(os.path.join(library_path, 'Kconfig'), os.path.join(library_dir, 'Kconfig'))
21