summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorWayne Lin <[email protected]>2020-05-15 09:41:27 +0800
committerWayne Lin <[email protected]>2020-05-15 09:41:27 +0800
commit5d65fe074f0e0ba53673ffef6205aab6baa76d0a (patch)
tree9847ae8364cbd3c7cec8168ba75e2c5cb15a8a41 /tools
parent39431f5a702f3dcec843cb8884064953594243ec (diff)
parentdab737f6375f5cdd86ad3bc6d166657b17364948 (diff)
Merge branch 'master' of https://github.com/rt-thread/rt-thread into rtt_issues
Diffstat (limited to 'tools')
-rw-r--r--tools/eclipse.py4
-rw-r--r--tools/mkdist.py17
-rw-r--r--tools/utils.py2
3 files changed, 7 insertions, 16 deletions
diff --git a/tools/eclipse.py b/tools/eclipse.py
index 699ecef4d1..48b38c8f0a 100644
--- a/tools/eclipse.py
+++ b/tools/eclipse.py
@@ -109,12 +109,12 @@ def ExcludeFiles(infiles, files):
def ExcludePaths(rootpath, paths):
ret = []
- files = os.listdir(rootpath)
+ files = os.listdir(OSPath(rootpath))
for file in files:
if file.startswith('.'):
continue
- fullname = os.path.join(rootpath, file)
+ fullname = os.path.join(OSPath(rootpath), file)
if os.path.isdir(fullname):
# print(fullname)
diff --git a/tools/mkdist.py b/tools/mkdist.py
index 7e4b9a8bbe..a6c744b470 100644
--- a/tools/mkdist.py
+++ b/tools/mkdist.py
@@ -122,7 +122,7 @@ def bsp_update_kconfig(dist_dir):
line = line[0:position] + 'default "rt-thread"\n'
found = 0
f.write(line)
-
+
def bsp_update_kconfig_library(dist_dir):
# change RTT_ROOT in Kconfig
if not os.path.isfile(os.path.join(dist_dir, 'Kconfig')):
@@ -141,7 +141,7 @@ def bsp_update_kconfig_library(dist_dir):
found = 0
f.write(line)
- # change board/kconfig path
+ # change board/kconfig path
if not os.path.isfile(os.path.join(dist_dir, 'board/Kconfig')):
return
@@ -215,11 +215,11 @@ def MkDist_Strip(program, BSP_ROOT, RTT_ROOT, Env):
shutil.copyfile(os.path.join(library_path, 'Kconfig'), os.path.join(library_dir, 'Kconfig'))
# do bsp special dist handle
- if 'dist_handle' in Env:
+ if 'dist_handle' in Env:
print("=> start dist handle")
dist_handle = Env['dist_handle']
dist_handle(BSP_ROOT)
-
+
# get all source files from program
for item in program:
walk_children(item)
@@ -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'))
-
# do bsp special dist handle
if 'dist_handle' in Env:
print("=> start dist handle")
diff --git a/tools/utils.py b/tools/utils.py
index 9459396544..67ce098ccd 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -273,7 +273,7 @@ def VersionCmp(ver1, ver2):
def GCCC99Patch(cflags):
import building
- gcc_version = building.GetDepend('GCC_VERSION')
+ gcc_version = building.GetDepend('GCC_VERSION_STR')
if gcc_version:
gcc_version = gcc_version.replace('"', '')
if VersionCmp(gcc_version, "4.8.0") == 1: