From 783cf540873297ba6b78161dee4a6dc545abcd54 Mon Sep 17 00:00:00 2001 From: SummerGift Date: Wed, 6 May 2020 14:53:15 +0800 Subject: [PATCH 1/6] [del] stm32 dist handle in mkdist.py --- tools/mkdist.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tools/mkdist.py b/tools/mkdist.py index d83020f755..e190123e6c 100644 --- a/tools/mkdist.py +++ b/tools/mkdist.py @@ -336,15 +336,6 @@ def MkDist(program, BSP_ROOT, RTT_ROOT, Env, rttide = None): print('=> %s' % os.path.basename(BSP_ROOT)) bsp_copy_files(BSP_ROOT, dist_dir) - # copy stm32 bsp libiary files - if os.path.basename(os.path.dirname(BSP_ROOT)) == 'stm32': - print("=> copy stm32 bsp library") - 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, 'HAL_Drivers'), os.path.join(library_dir, 'HAL_Drivers')) - bsp_copy_files(os.path.join(library_path, Env['bsp_lib_type']), os.path.join(library_dir, Env['bsp_lib_type'])) - shutil.copyfile(os.path.join(library_path, 'Kconfig'), os.path.join(library_dir, 'Kconfig')) - # copy nuclei bsp libiary files if os.path.basename(os.path.dirname(BSP_ROOT)) == 'nuclei': print("=> copy nuclei bsp library") From daf43f7443a7d51994ccfd83ac378f53d0bde923 Mon Sep 17 00:00:00 2001 From: SummerGift Date: Wed, 6 May 2020 14:54:57 +0800 Subject: [PATCH 2/6] [add] stm32 sdk_dist.py --- bsp/stm32/tools/sdk_dist.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 bsp/stm32/tools/sdk_dist.py diff --git a/bsp/stm32/tools/sdk_dist.py b/bsp/stm32/tools/sdk_dist.py new file mode 100644 index 0000000000..cd04eb6900 --- /dev/null +++ b/bsp/stm32/tools/sdk_dist.py @@ -0,0 +1,20 @@ +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_dir = os.path.join(dist_dir, 'libraries') + + print("=> copy stm32 bsp library") + 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')) \ No newline at end of file From b74ec1ec8c752b08a0e856cb9b123ab3fcbef294 Mon Sep 17 00:00:00 2001 From: SummerGift Date: Wed, 6 May 2020 15:04:11 +0800 Subject: [PATCH 3/6] [add] stm32 bsp dist handle in rtconfig.py --- bsp/stm32/libraries/templates/stm32f0xx/rtconfig.py | 7 +++++++ bsp/stm32/libraries/templates/stm32f10x/rtconfig.py | 7 +++++++ bsp/stm32/libraries/templates/stm32f2xx/rtconfig.py | 7 +++++++ bsp/stm32/libraries/templates/stm32f4xx/rtconfig.py | 7 +++++++ bsp/stm32/libraries/templates/stm32f7xx/rtconfig.py | 7 +++++++ bsp/stm32/libraries/templates/stm32h7xx/rtconfig.py | 7 +++++++ bsp/stm32/libraries/templates/stm32l1xx/rtconfig.py | 7 +++++++ bsp/stm32/libraries/templates/stm32l4xx/rtconfig.py | 7 +++++++ bsp/stm32/stm32f072-st-nucleo/rtconfig.py | 8 ++++++++ bsp/stm32/stm32f091-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32f103-atk-nano/rtconfig.py | 7 +++++++ bsp/stm32/stm32f103-atk-warshipv3/rtconfig.py | 7 +++++++ bsp/stm32/stm32f103-dofly-M3S/rtconfig.py | 7 +++++++ bsp/stm32/stm32f103-dofly-lyc8/rtconfig.py | 7 +++++++ bsp/stm32/stm32f103-fire-arbitrary/rtconfig.py | 7 +++++++ bsp/stm32/stm32f103-gizwits-gokitv21/rtconfig.py | 7 +++++++ bsp/stm32/stm32f103-hw100k-ibox/rtconfig.py | 7 +++++++ bsp/stm32/stm32f103-mini-system/rtconfig.py | 7 +++++++ bsp/stm32/stm32f103-yf-ufun/rtconfig.py | 7 +++++++ bsp/stm32/stm32f107-uc-eval/rtconfig.py | 7 +++++++ bsp/stm32/stm32f401-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32f405-smdz-breadfruit/rtconfig.py | 7 +++++++ bsp/stm32/stm32f407-atk-explorer/rtconfig.py | 7 +++++++ bsp/stm32/stm32f407-st-discovery/rtconfig.py | 7 +++++++ bsp/stm32/stm32f410-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32f411-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32f411-weact-MiniF4/rtconfig.py | 7 +++++++ bsp/stm32/stm32f412-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32f427-robomaster-a/rtconfig.py | 7 +++++++ bsp/stm32/stm32f429-armfly-v6/rtconfig.py | 7 +++++++ bsp/stm32/stm32f429-atk-apollo/rtconfig.py | 7 +++++++ bsp/stm32/stm32f429-fire-challenger/rtconfig.py | 7 +++++++ bsp/stm32/stm32f429-st-disco/rtconfig.py | 7 +++++++ bsp/stm32/stm32f446-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32f469-st-disco/rtconfig.py | 7 +++++++ bsp/stm32/stm32f767-atk-apollo/rtconfig.py | 9 ++++++++- bsp/stm32/stm32f767-fire-challenger/rtconfig.py | 9 ++++++++- bsp/stm32/stm32f769-st-disco/rtconfig.py | 7 +++++++ bsp/stm32/stm32g071-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32g431-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32h743-atk-apollo/rtconfig.py | 7 +++++++ bsp/stm32/stm32h743-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32h747-st-discovery/rtconfig.py | 7 +++++++ bsp/stm32/stm32h750-armfly-h7-tool/rtconfig.py | 7 +++++++ bsp/stm32/stm32l010-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32l053-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32l432-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32l452-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32l475-atk-pandora/rtconfig.py | 7 +++++++ bsp/stm32/stm32l475-st-discovery/rtconfig.py | 7 +++++++ bsp/stm32/stm32l476-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32l496-ali-developer/rtconfig.py | 7 +++++++ bsp/stm32/stm32l496-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32l4r5-st-nucleo/rtconfig.py | 7 +++++++ bsp/stm32/stm32l4r9-st-eval/rtconfig.py | 7 +++++++ 55 files changed, 388 insertions(+), 2 deletions(-) diff --git a/bsp/stm32/libraries/templates/stm32f0xx/rtconfig.py b/bsp/stm32/libraries/templates/stm32f0xx/rtconfig.py index bbc6a35774..395d83ca99 100644 --- a/bsp/stm32/libraries/templates/stm32f0xx/rtconfig.py +++ b/bsp/stm32/libraries/templates/stm32f0xx/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/libraries/templates/stm32f10x/rtconfig.py b/bsp/stm32/libraries/templates/stm32f10x/rtconfig.py index fa46b74340..46b00c62cd 100644 --- a/bsp/stm32/libraries/templates/stm32f10x/rtconfig.py +++ b/bsp/stm32/libraries/templates/stm32f10x/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/libraries/templates/stm32f2xx/rtconfig.py b/bsp/stm32/libraries/templates/stm32f2xx/rtconfig.py index 72f931202c..5b3a3f31f0 100644 --- a/bsp/stm32/libraries/templates/stm32f2xx/rtconfig.py +++ b/bsp/stm32/libraries/templates/stm32f2xx/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/libraries/templates/stm32f4xx/rtconfig.py b/bsp/stm32/libraries/templates/stm32f4xx/rtconfig.py index 638f59502a..0faea85775 100644 --- a/bsp/stm32/libraries/templates/stm32f4xx/rtconfig.py +++ b/bsp/stm32/libraries/templates/stm32f4xx/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/libraries/templates/stm32f7xx/rtconfig.py b/bsp/stm32/libraries/templates/stm32f7xx/rtconfig.py index 21d8e13bb3..cf4cf47fe0 100644 --- a/bsp/stm32/libraries/templates/stm32f7xx/rtconfig.py +++ b/bsp/stm32/libraries/templates/stm32f7xx/rtconfig.py @@ -140,3 +140,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/libraries/templates/stm32h7xx/rtconfig.py b/bsp/stm32/libraries/templates/stm32h7xx/rtconfig.py index ef6708f653..780275b28c 100644 --- a/bsp/stm32/libraries/templates/stm32h7xx/rtconfig.py +++ b/bsp/stm32/libraries/templates/stm32h7xx/rtconfig.py @@ -142,3 +142,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/libraries/templates/stm32l1xx/rtconfig.py b/bsp/stm32/libraries/templates/stm32l1xx/rtconfig.py index 8b60665034..0450b21fcd 100644 --- a/bsp/stm32/libraries/templates/stm32l1xx/rtconfig.py +++ b/bsp/stm32/libraries/templates/stm32l1xx/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/libraries/templates/stm32l4xx/rtconfig.py b/bsp/stm32/libraries/templates/stm32l4xx/rtconfig.py index 2e022a964b..deb2083359 100644 --- a/bsp/stm32/libraries/templates/stm32l4xx/rtconfig.py +++ b/bsp/stm32/libraries/templates/stm32l4xx/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f072-st-nucleo/rtconfig.py b/bsp/stm32/stm32f072-st-nucleo/rtconfig.py index bbc6a35774..8d8cd61658 100644 --- a/bsp/stm32/stm32f072-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32f072-st-nucleo/rtconfig.py @@ -141,3 +141,11 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) + diff --git a/bsp/stm32/stm32f091-st-nucleo/rtconfig.py b/bsp/stm32/stm32f091-st-nucleo/rtconfig.py index bbc6a35774..395d83ca99 100644 --- a/bsp/stm32/stm32f091-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32f091-st-nucleo/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f103-atk-nano/rtconfig.py b/bsp/stm32/stm32f103-atk-nano/rtconfig.py index 9ace3b0a3c..b8509ee7a0 100644 --- a/bsp/stm32/stm32f103-atk-nano/rtconfig.py +++ b/bsp/stm32/stm32f103-atk-nano/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f103-atk-warshipv3/rtconfig.py b/bsp/stm32/stm32f103-atk-warshipv3/rtconfig.py index fa46b74340..46b00c62cd 100644 --- a/bsp/stm32/stm32f103-atk-warshipv3/rtconfig.py +++ b/bsp/stm32/stm32f103-atk-warshipv3/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f103-dofly-M3S/rtconfig.py b/bsp/stm32/stm32f103-dofly-M3S/rtconfig.py index 233b0e6440..8c30e41437 100644 --- a/bsp/stm32/stm32f103-dofly-M3S/rtconfig.py +++ b/bsp/stm32/stm32f103-dofly-M3S/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f103-dofly-lyc8/rtconfig.py b/bsp/stm32/stm32f103-dofly-lyc8/rtconfig.py index 9ace3b0a3c..b8509ee7a0 100644 --- a/bsp/stm32/stm32f103-dofly-lyc8/rtconfig.py +++ b/bsp/stm32/stm32f103-dofly-lyc8/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f103-fire-arbitrary/rtconfig.py b/bsp/stm32/stm32f103-fire-arbitrary/rtconfig.py index 9ace3b0a3c..b8509ee7a0 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/rtconfig.py +++ b/bsp/stm32/stm32f103-fire-arbitrary/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f103-gizwits-gokitv21/rtconfig.py b/bsp/stm32/stm32f103-gizwits-gokitv21/rtconfig.py index fa46b74340..46b00c62cd 100644 --- a/bsp/stm32/stm32f103-gizwits-gokitv21/rtconfig.py +++ b/bsp/stm32/stm32f103-gizwits-gokitv21/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f103-hw100k-ibox/rtconfig.py b/bsp/stm32/stm32f103-hw100k-ibox/rtconfig.py index fa46b74340..46b00c62cd 100644 --- a/bsp/stm32/stm32f103-hw100k-ibox/rtconfig.py +++ b/bsp/stm32/stm32f103-hw100k-ibox/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f103-mini-system/rtconfig.py b/bsp/stm32/stm32f103-mini-system/rtconfig.py index c16c2fdda7..7912203103 100644 --- a/bsp/stm32/stm32f103-mini-system/rtconfig.py +++ b/bsp/stm32/stm32f103-mini-system/rtconfig.py @@ -142,3 +142,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f103-yf-ufun/rtconfig.py b/bsp/stm32/stm32f103-yf-ufun/rtconfig.py index fa46b74340..46b00c62cd 100644 --- a/bsp/stm32/stm32f103-yf-ufun/rtconfig.py +++ b/bsp/stm32/stm32f103-yf-ufun/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f107-uc-eval/rtconfig.py b/bsp/stm32/stm32f107-uc-eval/rtconfig.py index 9ace3b0a3c..b8509ee7a0 100644 --- a/bsp/stm32/stm32f107-uc-eval/rtconfig.py +++ b/bsp/stm32/stm32f107-uc-eval/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f401-st-nucleo/rtconfig.py b/bsp/stm32/stm32f401-st-nucleo/rtconfig.py index 3b4b3a5208..90240ee5f8 100644 --- a/bsp/stm32/stm32f401-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32f401-st-nucleo/rtconfig.py @@ -142,3 +142,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f405-smdz-breadfruit/rtconfig.py b/bsp/stm32/stm32f405-smdz-breadfruit/rtconfig.py index 81e39f9513..e54b11c079 100644 --- a/bsp/stm32/stm32f405-smdz-breadfruit/rtconfig.py +++ b/bsp/stm32/stm32f405-smdz-breadfruit/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f407-atk-explorer/rtconfig.py b/bsp/stm32/stm32f407-atk-explorer/rtconfig.py index 638f59502a..0faea85775 100644 --- a/bsp/stm32/stm32f407-atk-explorer/rtconfig.py +++ b/bsp/stm32/stm32f407-atk-explorer/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f407-st-discovery/rtconfig.py b/bsp/stm32/stm32f407-st-discovery/rtconfig.py index 32024fa83a..50393c3125 100644 --- a/bsp/stm32/stm32f407-st-discovery/rtconfig.py +++ b/bsp/stm32/stm32f407-st-discovery/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f410-st-nucleo/rtconfig.py b/bsp/stm32/stm32f410-st-nucleo/rtconfig.py index 8c0a3e1281..2ac9f2b706 100644 --- a/bsp/stm32/stm32f410-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32f410-st-nucleo/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f411-st-nucleo/rtconfig.py b/bsp/stm32/stm32f411-st-nucleo/rtconfig.py index 8c0a3e1281..2ac9f2b706 100644 --- a/bsp/stm32/stm32f411-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32f411-st-nucleo/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f411-weact-MiniF4/rtconfig.py b/bsp/stm32/stm32f411-weact-MiniF4/rtconfig.py index 8c0a3e1281..2ac9f2b706 100644 --- a/bsp/stm32/stm32f411-weact-MiniF4/rtconfig.py +++ b/bsp/stm32/stm32f411-weact-MiniF4/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f412-st-nucleo/rtconfig.py b/bsp/stm32/stm32f412-st-nucleo/rtconfig.py index 40b84ad846..dddfc31180 100644 --- a/bsp/stm32/stm32f412-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32f412-st-nucleo/rtconfig.py @@ -142,3 +142,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f427-robomaster-a/rtconfig.py b/bsp/stm32/stm32f427-robomaster-a/rtconfig.py index 638f59502a..0faea85775 100644 --- a/bsp/stm32/stm32f427-robomaster-a/rtconfig.py +++ b/bsp/stm32/stm32f427-robomaster-a/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f429-armfly-v6/rtconfig.py b/bsp/stm32/stm32f429-armfly-v6/rtconfig.py index 79419c6c06..ed19e36763 100644 --- a/bsp/stm32/stm32f429-armfly-v6/rtconfig.py +++ b/bsp/stm32/stm32f429-armfly-v6/rtconfig.py @@ -142,3 +142,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f429-atk-apollo/rtconfig.py b/bsp/stm32/stm32f429-atk-apollo/rtconfig.py index 638f59502a..0faea85775 100644 --- a/bsp/stm32/stm32f429-atk-apollo/rtconfig.py +++ b/bsp/stm32/stm32f429-atk-apollo/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f429-fire-challenger/rtconfig.py b/bsp/stm32/stm32f429-fire-challenger/rtconfig.py index 638f59502a..0faea85775 100644 --- a/bsp/stm32/stm32f429-fire-challenger/rtconfig.py +++ b/bsp/stm32/stm32f429-fire-challenger/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f429-st-disco/rtconfig.py b/bsp/stm32/stm32f429-st-disco/rtconfig.py index 32024fa83a..50393c3125 100644 --- a/bsp/stm32/stm32f429-st-disco/rtconfig.py +++ b/bsp/stm32/stm32f429-st-disco/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f446-st-nucleo/rtconfig.py b/bsp/stm32/stm32f446-st-nucleo/rtconfig.py index 638f59502a..0faea85775 100644 --- a/bsp/stm32/stm32f446-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32f446-st-nucleo/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f469-st-disco/rtconfig.py b/bsp/stm32/stm32f469-st-disco/rtconfig.py index 32024fa83a..50393c3125 100644 --- a/bsp/stm32/stm32f469-st-disco/rtconfig.py +++ b/bsp/stm32/stm32f469-st-disco/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f767-atk-apollo/rtconfig.py b/bsp/stm32/stm32f767-atk-apollo/rtconfig.py index dedc1b9580..b8a5eb5c19 100644 --- a/bsp/stm32/stm32f767-atk-apollo/rtconfig.py +++ b/bsp/stm32/stm32f767-atk-apollo/rtconfig.py @@ -140,4 +140,11 @@ elif PLATFORM == 'iar': CXXFLAGS = CFLAGS EXEC_PATH = EXEC_PATH + '/arm/bin/' - POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' \ No newline at end of file + POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) \ No newline at end of file diff --git a/bsp/stm32/stm32f767-fire-challenger/rtconfig.py b/bsp/stm32/stm32f767-fire-challenger/rtconfig.py index 7a46cc624d..ecd0d1a055 100644 --- a/bsp/stm32/stm32f767-fire-challenger/rtconfig.py +++ b/bsp/stm32/stm32f767-fire-challenger/rtconfig.py @@ -140,4 +140,11 @@ elif PLATFORM == 'iar': CXXFLAGS = CFLAGS EXEC_PATH = EXEC_PATH + '/arm/bin/' - POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' \ No newline at end of file + POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) \ No newline at end of file diff --git a/bsp/stm32/stm32f769-st-disco/rtconfig.py b/bsp/stm32/stm32f769-st-disco/rtconfig.py index 21d8e13bb3..cf4cf47fe0 100644 --- a/bsp/stm32/stm32f769-st-disco/rtconfig.py +++ b/bsp/stm32/stm32f769-st-disco/rtconfig.py @@ -140,3 +140,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32g071-st-nucleo/rtconfig.py b/bsp/stm32/stm32g071-st-nucleo/rtconfig.py index d86774675d..7452398326 100644 --- a/bsp/stm32/stm32g071-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32g071-st-nucleo/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32g431-st-nucleo/rtconfig.py b/bsp/stm32/stm32g431-st-nucleo/rtconfig.py index 638f59502a..0faea85775 100644 --- a/bsp/stm32/stm32g431-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32g431-st-nucleo/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32h743-atk-apollo/rtconfig.py b/bsp/stm32/stm32h743-atk-apollo/rtconfig.py index ef6708f653..780275b28c 100644 --- a/bsp/stm32/stm32h743-atk-apollo/rtconfig.py +++ b/bsp/stm32/stm32h743-atk-apollo/rtconfig.py @@ -142,3 +142,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32h743-st-nucleo/rtconfig.py b/bsp/stm32/stm32h743-st-nucleo/rtconfig.py index ef6708f653..780275b28c 100644 --- a/bsp/stm32/stm32h743-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32h743-st-nucleo/rtconfig.py @@ -142,3 +142,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32h747-st-discovery/rtconfig.py b/bsp/stm32/stm32h747-st-discovery/rtconfig.py index ef6708f653..780275b28c 100644 --- a/bsp/stm32/stm32h747-st-discovery/rtconfig.py +++ b/bsp/stm32/stm32h747-st-discovery/rtconfig.py @@ -142,3 +142,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32h750-armfly-h7-tool/rtconfig.py b/bsp/stm32/stm32h750-armfly-h7-tool/rtconfig.py index ef6708f653..780275b28c 100644 --- a/bsp/stm32/stm32h750-armfly-h7-tool/rtconfig.py +++ b/bsp/stm32/stm32h750-armfly-h7-tool/rtconfig.py @@ -142,3 +142,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32l010-st-nucleo/rtconfig.py b/bsp/stm32/stm32l010-st-nucleo/rtconfig.py index 39d6af6879..dd13683b26 100644 --- a/bsp/stm32/stm32l010-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32l010-st-nucleo/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32l053-st-nucleo/rtconfig.py b/bsp/stm32/stm32l053-st-nucleo/rtconfig.py index 39d6af6879..dd13683b26 100644 --- a/bsp/stm32/stm32l053-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32l053-st-nucleo/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32l432-st-nucleo/rtconfig.py b/bsp/stm32/stm32l432-st-nucleo/rtconfig.py index 2e022a964b..deb2083359 100644 --- a/bsp/stm32/stm32l432-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32l432-st-nucleo/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32l452-st-nucleo/rtconfig.py b/bsp/stm32/stm32l452-st-nucleo/rtconfig.py index 2e022a964b..deb2083359 100644 --- a/bsp/stm32/stm32l452-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32l452-st-nucleo/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32l475-atk-pandora/rtconfig.py b/bsp/stm32/stm32l475-atk-pandora/rtconfig.py index 40b84ad846..dddfc31180 100644 --- a/bsp/stm32/stm32l475-atk-pandora/rtconfig.py +++ b/bsp/stm32/stm32l475-atk-pandora/rtconfig.py @@ -142,3 +142,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32l475-st-discovery/rtconfig.py b/bsp/stm32/stm32l475-st-discovery/rtconfig.py index 3e4718a482..c02cbb090a 100644 --- a/bsp/stm32/stm32l475-st-discovery/rtconfig.py +++ b/bsp/stm32/stm32l475-st-discovery/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32l476-st-nucleo/rtconfig.py b/bsp/stm32/stm32l476-st-nucleo/rtconfig.py index 7fc0f14860..826d5425f5 100644 --- a/bsp/stm32/stm32l476-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32l476-st-nucleo/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32l496-ali-developer/rtconfig.py b/bsp/stm32/stm32l496-ali-developer/rtconfig.py index 2e022a964b..deb2083359 100644 --- a/bsp/stm32/stm32l496-ali-developer/rtconfig.py +++ b/bsp/stm32/stm32l496-ali-developer/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32l496-st-nucleo/rtconfig.py b/bsp/stm32/stm32l496-st-nucleo/rtconfig.py index 40b84ad846..dddfc31180 100644 --- a/bsp/stm32/stm32l496-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32l496-st-nucleo/rtconfig.py @@ -142,3 +142,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32l4r5-st-nucleo/rtconfig.py b/bsp/stm32/stm32l4r5-st-nucleo/rtconfig.py index 33e1a6bc4a..e9a00ad628 100644 --- a/bsp/stm32/stm32l4r5-st-nucleo/rtconfig.py +++ b/bsp/stm32/stm32l4r5-st-nucleo/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32l4r9-st-eval/rtconfig.py b/bsp/stm32/stm32l4r9-st-eval/rtconfig.py index 75b5d9925e..f1d97ac603 100644 --- a/bsp/stm32/stm32l4r9-st-eval/rtconfig.py +++ b/bsp/stm32/stm32l4r9-st-eval/rtconfig.py @@ -141,3 +141,10 @@ elif PLATFORM == 'iar': EXEC_PATH = EXEC_PATH + '/arm/bin/' POST_ACTION = 'ielftool --bin $TARGET rtthread.bin' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) From dbfd464a77ff213490d78b67af1146a326d43425 Mon Sep 17 00:00:00 2001 From: SummerGift Date: Wed, 6 May 2020 15:17:45 +0800 Subject: [PATCH 4/6] [update] lpc55sxx/tools/sdk_dist.py --- bsp/lpc55sxx/tools/sdk_dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/lpc55sxx/tools/sdk_dist.py b/bsp/lpc55sxx/tools/sdk_dist.py index 9254b1b589..a69c8f2db1 100644 --- a/bsp/lpc55sxx/tools/sdk_dist.py +++ b/bsp/lpc55sxx/tools/sdk_dist.py @@ -8,7 +8,7 @@ sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools')) 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') From 36755af0be6b92f095702afa2fae6e0376a27681 Mon Sep 17 00:00:00 2001 From: SummerGift Date: Wed, 6 May 2020 15:32:53 +0800 Subject: [PATCH 5/6] [update] nuclei dist handle --- bsp/nuclei/gd32vf103_rvstar/rtconfig.py | 12 ++++++++++++ bsp/nuclei/tools/sdk_dist.py | 18 ++++++++++++++++++ tools/mkdist.py | 7 ------- 3 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 bsp/nuclei/tools/sdk_dist.py diff --git a/bsp/nuclei/gd32vf103_rvstar/rtconfig.py b/bsp/nuclei/gd32vf103_rvstar/rtconfig.py index 8136b392f8..bf74338e8a 100644 --- a/bsp/nuclei/gd32vf103_rvstar/rtconfig.py +++ b/bsp/nuclei/gd32vf103_rvstar/rtconfig.py @@ -5,6 +5,9 @@ ARCH='risc-v' CPU='nuclei' CROSS_TOOL='gcc' +# bsp lib config +BSP_LIBRARY_TYPE = None + if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') @@ -18,7 +21,9 @@ else: # EXEC_PATH = os.getenv('RTT_EXEC_PATH') BUILD = 'debug' + # Fixed configurations below +NUCLEI_SDK_OPENOCD_CFG = "type in your config" NUCLEI_SDK_SOC = "gd32vf103" NUCLEI_SDK_BOARD = "gd32vf103v_rvstar" NUCLEI_SDK_DOWNLOAD = "flashxip" @@ -56,3 +61,10 @@ if PLATFORM == 'gcc': DUMP_ACTION = OBJDUMP + ' -D -S $TARGET > rtt.asm\n' POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n' + +def dist_handle(BSP_ROOT): + import sys + cwd_path = os.getcwd() + sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) + from sdk_dist import dist_do_building + dist_do_building(BSP_ROOT) diff --git a/bsp/nuclei/tools/sdk_dist.py b/bsp/nuclei/tools/sdk_dist.py new file mode 100644 index 0000000000..f802e92730 --- /dev/null +++ b/bsp/nuclei/tools/sdk_dist.py @@ -0,0 +1,18 @@ +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_dir = os.path.join(dist_dir, 'libraries') + + print("=> copy nuclei bsp library") + 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)) diff --git a/tools/mkdist.py b/tools/mkdist.py index e190123e6c..a6c744b470 100644 --- a/tools/mkdist.py +++ b/tools/mkdist.py @@ -336,13 +336,6 @@ def MkDist(program, BSP_ROOT, RTT_ROOT, Env, rttide = None): print('=> %s' % os.path.basename(BSP_ROOT)) bsp_copy_files(BSP_ROOT, dist_dir) - # copy nuclei bsp libiary files - if os.path.basename(os.path.dirname(BSP_ROOT)) == 'nuclei': - print("=> copy nuclei bsp library") - 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, Env['bsp_lib_type']), os.path.join(library_dir, Env['bsp_lib_type'])) - # do bsp special dist handle if 'dist_handle' in Env: print("=> start dist handle") From 9f6696964a16b4094d8da0fcd8c102d97bf9f8c5 Mon Sep 17 00:00:00 2001 From: SummerGift Date: Wed, 6 May 2020 15:43:04 +0800 Subject: [PATCH 6/6] [update] add new line --- bsp/stm32/stm32f767-atk-apollo/rtconfig.py | 2 +- bsp/stm32/stm32f767-fire-challenger/rtconfig.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bsp/stm32/stm32f767-atk-apollo/rtconfig.py b/bsp/stm32/stm32f767-atk-apollo/rtconfig.py index b8a5eb5c19..bc4112597c 100644 --- a/bsp/stm32/stm32f767-atk-apollo/rtconfig.py +++ b/bsp/stm32/stm32f767-atk-apollo/rtconfig.py @@ -147,4 +147,4 @@ def dist_handle(BSP_ROOT): cwd_path = os.getcwd() sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) from sdk_dist import dist_do_building - dist_do_building(BSP_ROOT) \ No newline at end of file + dist_do_building(BSP_ROOT) diff --git a/bsp/stm32/stm32f767-fire-challenger/rtconfig.py b/bsp/stm32/stm32f767-fire-challenger/rtconfig.py index ecd0d1a055..c83a51a09d 100644 --- a/bsp/stm32/stm32f767-fire-challenger/rtconfig.py +++ b/bsp/stm32/stm32f767-fire-challenger/rtconfig.py @@ -147,4 +147,4 @@ def dist_handle(BSP_ROOT): cwd_path = os.getcwd() sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools')) from sdk_dist import dist_do_building - dist_do_building(BSP_ROOT) \ No newline at end of file + dist_do_building(BSP_ROOT)