Skip to content

Commit 5c20c4f

Browse files
CYFS3Rbb666
authored andcommitted
[bsp][hpm]:fix scons --dist
1 parent 2fcdd86 commit 5c20c4f

File tree

21 files changed

+170
-254
lines changed

21 files changed

+170
-254
lines changed

bsp/hpmicro/hpm5300evk/SConstruct

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@ except:
1515
print(RTT_ROOT)
1616
exit(-1)
1717

18+
def bsp_pkg_check():
19+
import subprocess
20+
21+
need_update = True
22+
for p in os.listdir("packages"):
23+
if p.startswith("hpm_sdk-"):
24+
need_update = False
25+
break
26+
if need_update:
27+
print("\n===============================================================================")
28+
print("Dependency packages missing, please running 'pkgs --update'...")
29+
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
30+
print("===============================================================================")
31+
exit(1)
32+
33+
RegisterPreBuildingAction(bsp_pkg_check)
34+
1835
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
1936

2037
AddOption('--run',
@@ -56,7 +73,6 @@ GDB = rtconfig.GDB
5673
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
5774

5875

59-
6076
# includes rtt drivers
6177
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'drivers', 'SConscript')))
6278

bsp/hpmicro/hpm5300evk/rtconfig.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,6 @@
1212
RTT_ROOT = os.path.normpath(os.getcwd() + '/../../..')
1313

1414
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
15-
try:
16-
from building import *
17-
except:
18-
print('Cannot found RT-Thread root directory, please check RTT_ROOT')
19-
print(RTT_ROOT)
20-
exit(-1)
21-
22-
def bsp_pkg_check():
23-
import subprocess
24-
25-
need_update = True
26-
for p in os.listdir("packages"):
27-
if p.startswith("hpm_sdk-"):
28-
need_update = False
29-
break
30-
if need_update:
31-
print("\n===============================================================================")
32-
print("Dependency packages missing, please running 'pkgs --update'...")
33-
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
34-
print("===============================================================================")
35-
exit(1)
36-
37-
RegisterPreBuildingAction(bsp_pkg_check)
3815

3916

4017
# toolchains options

bsp/hpmicro/hpm5301evklite/SConstruct

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@ except:
1515
print(RTT_ROOT)
1616
exit(-1)
1717

18+
def bsp_pkg_check():
19+
import subprocess
20+
21+
need_update = True
22+
for p in os.listdir("packages"):
23+
if p.startswith("hpm_sdk-"):
24+
need_update = False
25+
break
26+
if need_update:
27+
print("\n===============================================================================")
28+
print("Dependency packages missing, please running 'pkgs --update'...")
29+
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
30+
print("===============================================================================")
31+
exit(1)
32+
33+
RegisterPreBuildingAction(bsp_pkg_check)
34+
1835
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
1936

2037
AddOption('--run',

bsp/hpmicro/hpm5301evklite/rtconfig.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,6 @@
1212
RTT_ROOT = os.path.normpath(os.getcwd() + '/../../..')
1313

1414
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
15-
try:
16-
from building import *
17-
except:
18-
print('Cannot found RT-Thread root directory, please check RTT_ROOT')
19-
print(RTT_ROOT)
20-
exit(-1)
21-
22-
def bsp_pkg_check():
23-
import subprocess
24-
25-
need_update = True
26-
for p in os.listdir("packages"):
27-
if p.startswith("hpm_sdk-"):
28-
need_update = False
29-
break
30-
if need_update:
31-
print("\n===============================================================================")
32-
print("Dependency packages missing, please running 'pkgs --update'...")
33-
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
34-
print("===============================================================================")
35-
exit(1)
36-
37-
RegisterPreBuildingAction(bsp_pkg_check)
38-
3915

4016
# toolchains options
4117
ARCH='risc-v'

bsp/hpmicro/hpm5e00evk/SConstruct

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@ except:
1515
print(RTT_ROOT)
1616
exit(-1)
1717

18+
def bsp_pkg_check():
19+
import subprocess
20+
21+
need_update = True
22+
for p in os.listdir("packages"):
23+
if p.startswith("hpm_sdk-"):
24+
need_update = False
25+
break
26+
if need_update:
27+
print("\n===============================================================================")
28+
print("Dependency packages missing, please running 'pkgs --update'...")
29+
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
30+
print("===============================================================================")
31+
exit(1)
32+
33+
RegisterPreBuildingAction(bsp_pkg_check)
34+
1835
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
1936

2037
AddOption('--run',

bsp/hpmicro/hpm5e00evk/rtconfig.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,6 @@
1212
RTT_ROOT = os.path.normpath(os.getcwd() + '/../../..')
1313

1414
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
15-
try:
16-
from building import *
17-
except:
18-
print('Cannot found RT-Thread root directory, please check RTT_ROOT')
19-
print(RTT_ROOT)
20-
exit(-1)
21-
22-
def bsp_pkg_check():
23-
import subprocess
24-
25-
need_update = True
26-
for p in os.listdir("packages"):
27-
if p.startswith("hpm_sdk-"):
28-
need_update = False
29-
break
30-
if need_update:
31-
print("\n===============================================================================")
32-
print("Dependency packages missing, please running 'pkgs --update'...")
33-
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
34-
print("===============================================================================")
35-
exit(1)
36-
37-
RegisterPreBuildingAction(bsp_pkg_check)
38-
3915

4016
# toolchains options
4117
ARCH='risc-v'

bsp/hpmicro/hpm6200evk/SConstruct

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@ except:
1515
print(RTT_ROOT)
1616
exit(-1)
1717

18+
def bsp_pkg_check():
19+
import subprocess
20+
21+
need_update = True
22+
for p in os.listdir("packages"):
23+
if p.startswith("hpm_sdk-"):
24+
need_update = False
25+
break
26+
if need_update:
27+
print("\n===============================================================================")
28+
print("Dependency packages missing, please running 'pkgs --update'...")
29+
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
30+
print("===============================================================================")
31+
exit(1)
32+
33+
RegisterPreBuildingAction(bsp_pkg_check)
34+
1835
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
1936

2037
AddOption('--run',

bsp/hpmicro/hpm6200evk/rtconfig.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,6 @@
1212
RTT_ROOT = os.path.normpath(os.getcwd() + '/../../..')
1313

1414
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
15-
try:
16-
from building import *
17-
except:
18-
print('Cannot found RT-Thread root directory, please check RTT_ROOT')
19-
print(RTT_ROOT)
20-
exit(-1)
21-
22-
def bsp_pkg_check():
23-
import subprocess
24-
25-
need_update = True
26-
for p in os.listdir("packages"):
27-
if p.startswith("hpm_sdk-"):
28-
need_update = False
29-
break
30-
if need_update:
31-
print("\n===============================================================================")
32-
print("Dependency packages missing, please running 'pkgs --update'...")
33-
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
34-
print("===============================================================================")
35-
exit(1)
36-
37-
RegisterPreBuildingAction(bsp_pkg_check)
38-
3915

4016
# toolchains options
4117
ARCH='risc-v'

bsp/hpmicro/hpm6300evk/SConstruct

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@ except:
1515
print(RTT_ROOT)
1616
exit(-1)
1717

18+
def bsp_pkg_check():
19+
import subprocess
20+
21+
need_update = True
22+
for p in os.listdir("packages"):
23+
if p.startswith("hpm_sdk-"):
24+
need_update = False
25+
break
26+
if need_update:
27+
print("\n===============================================================================")
28+
print("Dependency packages missing, please running 'pkgs --update'...")
29+
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
30+
print("===============================================================================")
31+
exit(1)
32+
33+
RegisterPreBuildingAction(bsp_pkg_check)
34+
1835
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
1936

2037
AddOption('--run',

bsp/hpmicro/hpm6300evk/rtconfig.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,6 @@
1212
RTT_ROOT = os.path.normpath(os.getcwd() + '/../../..')
1313

1414
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
15-
try:
16-
from building import *
17-
except:
18-
print('Cannot found RT-Thread root directory, please check RTT_ROOT')
19-
print(RTT_ROOT)
20-
exit(-1)
21-
22-
def bsp_pkg_check():
23-
import subprocess
24-
25-
need_update = True
26-
for p in os.listdir("packages"):
27-
if p.startswith("hpm_sdk-"):
28-
need_update = False
29-
break
30-
if need_update:
31-
print("\n===============================================================================")
32-
print("Dependency packages missing, please running 'pkgs --update'...")
33-
print("If no packages are fetched, run 'pkgs --upgrade' first, then 'pkgs --update'...")
34-
print("===============================================================================")
35-
exit(1)
36-
37-
RegisterPreBuildingAction(bsp_pkg_check)
38-
3915

4016
# toolchains options
4117
ARCH='risc-v'

0 commit comments

Comments
 (0)