mirror of https://github.com/RT-Thread/rt-thread
[bsp/xuantie] 修复bsp的dist功能
This commit is contained in:
parent
b2ce955126
commit
d62f1e46b8
|
@ -7,9 +7,13 @@ cwd = GetCurrentDir()
|
|||
objs = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
||||
for item in list:
|
||||
path = os.path.join(cwd, item)
|
||||
if item == 'libraries' or not os.path.isdir(path):
|
||||
continue
|
||||
|
||||
sconscript_path = os.path.join(path, 'SConscript')
|
||||
if os.path.isfile(sconscript_path):
|
||||
objs.extend(SConscript(os.path.join(item, 'SConscript')))
|
||||
|
||||
Return('objs')
|
||||
|
|
|
@ -24,6 +24,8 @@ BUILD = 'debug'
|
|||
CORE = 'risc-v'
|
||||
MAP_FILE = 'rtthread.map'
|
||||
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_smartl.ld'
|
||||
if os.path.exists('./libraries'):
|
||||
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_smartl.ld'
|
||||
TARGET_NAME = 'rtthread.bin'
|
||||
|
||||
#------- GCC settings ----------------------------------------------------------
|
||||
|
@ -85,6 +87,6 @@ if PLATFORM == 'gcc':
|
|||
def dist_handle(BSP_ROOT, dist_dir):
|
||||
import sys
|
||||
cwd_path = os.getcwd()
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
|
||||
from sdk_dist import dist_do_building
|
||||
dist_do_building(BSP_ROOT, dist_dir)
|
||||
|
|
|
@ -7,9 +7,13 @@ cwd = GetCurrentDir()
|
|||
objs = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
||||
for item in list:
|
||||
path = os.path.join(cwd, item)
|
||||
if item == 'libraries' or not os.path.isdir(path):
|
||||
continue
|
||||
|
||||
sconscript_path = os.path.join(path, 'SConscript')
|
||||
if os.path.isfile(sconscript_path):
|
||||
objs.extend(SConscript(os.path.join(item, 'SConscript')))
|
||||
|
||||
Return('objs')
|
||||
|
|
|
@ -24,6 +24,8 @@ BUILD = 'debug'
|
|||
CORE = 'risc-v'
|
||||
MAP_FILE = 'rtthread.map'
|
||||
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_smartl.ld'
|
||||
if os.path.exists('./libraries'):
|
||||
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_smartl.ld'
|
||||
TARGET_NAME = 'rtthread.bin'
|
||||
|
||||
#------- GCC settings ----------------------------------------------------------
|
||||
|
@ -85,6 +87,6 @@ if PLATFORM == 'gcc':
|
|||
def dist_handle(BSP_ROOT, dist_dir):
|
||||
import sys
|
||||
cwd_path = os.getcwd()
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
|
||||
from sdk_dist import dist_do_building
|
||||
dist_do_building(BSP_ROOT, dist_dir)
|
||||
|
|
|
@ -7,9 +7,13 @@ cwd = GetCurrentDir()
|
|||
objs = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
||||
for item in list:
|
||||
path = os.path.join(cwd, item)
|
||||
if item == 'libraries' or not os.path.isdir(path):
|
||||
continue
|
||||
|
||||
sconscript_path = os.path.join(path, 'SConscript')
|
||||
if os.path.isfile(sconscript_path):
|
||||
objs.extend(SConscript(os.path.join(item, 'SConscript')))
|
||||
|
||||
Return('objs')
|
||||
|
|
|
@ -24,6 +24,8 @@ BUILD = 'debug'
|
|||
CORE = 'risc-v'
|
||||
MAP_FILE = 'rtthread.map'
|
||||
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_smartl.ld'
|
||||
if os.path.exists('./libraries'):
|
||||
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_smartl.ld'
|
||||
TARGET_NAME = 'rtthread.bin'
|
||||
|
||||
#------- GCC settings ----------------------------------------------------------
|
||||
|
@ -85,6 +87,6 @@ if PLATFORM == 'gcc':
|
|||
def dist_handle(BSP_ROOT, dist_dir):
|
||||
import sys
|
||||
cwd_path = os.getcwd()
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
|
||||
from sdk_dist import dist_do_building
|
||||
dist_do_building(BSP_ROOT, dist_dir)
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
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, dist_dir):
|
||||
from mkdist import bsp_copy_files
|
||||
import rtconfig
|
||||
|
||||
print(dist_dir)
|
||||
print("=> copy XUANTIE bsp library")
|
||||
library_dir = os.path.join(dist_dir, './libraries')
|
||||
library_path = os.path.join(os.path.dirname(BSP_ROOT), '../libraries')
|
||||
bsp_copy_files(library_path, library_dir)
|
|
@ -7,9 +7,13 @@ cwd = GetCurrentDir()
|
|||
objs = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
||||
for item in list:
|
||||
path = os.path.join(cwd, item)
|
||||
if item == 'libraries' or not os.path.isdir(path):
|
||||
continue
|
||||
|
||||
sconscript_path = os.path.join(path, 'SConscript')
|
||||
if os.path.isfile(sconscript_path):
|
||||
objs.extend(SConscript(os.path.join(item, 'SConscript')))
|
||||
|
||||
Return('objs')
|
||||
|
|
|
@ -24,6 +24,8 @@ BUILD = 'debug'
|
|||
CORE = 'risc-v'
|
||||
MAP_FILE = 'rtthread.map'
|
||||
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
if os.path.exists('./libraries'):
|
||||
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
TARGET_NAME = 'rtthread.bin'
|
||||
|
||||
#------- GCC settings ----------------------------------------------------------
|
||||
|
@ -92,6 +94,6 @@ if PLATFORM == 'gcc':
|
|||
def dist_handle(BSP_ROOT, dist_dir):
|
||||
import sys
|
||||
cwd_path = os.getcwd()
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
|
||||
from sdk_dist import dist_do_building
|
||||
dist_do_building(BSP_ROOT, dist_dir)
|
||||
|
|
|
@ -7,9 +7,13 @@ cwd = GetCurrentDir()
|
|||
objs = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
||||
for item in list:
|
||||
path = os.path.join(cwd, item)
|
||||
if item == 'libraries' or not os.path.isdir(path):
|
||||
continue
|
||||
|
||||
sconscript_path = os.path.join(path, 'SConscript')
|
||||
if os.path.isfile(sconscript_path):
|
||||
objs.extend(SConscript(os.path.join(item, 'SConscript')))
|
||||
|
||||
Return('objs')
|
||||
|
|
|
@ -24,6 +24,8 @@ BUILD = 'debug'
|
|||
CORE = 'risc-v'
|
||||
MAP_FILE = 'rtthread.map'
|
||||
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
if os.path.exists('./libraries'):
|
||||
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
TARGET_NAME = 'rtthread.bin'
|
||||
|
||||
#------- GCC settings ----------------------------------------------------------
|
||||
|
@ -92,6 +94,6 @@ if PLATFORM == 'gcc':
|
|||
def dist_handle(BSP_ROOT, dist_dir):
|
||||
import sys
|
||||
cwd_path = os.getcwd()
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
|
||||
from sdk_dist import dist_do_building
|
||||
dist_do_building(BSP_ROOT, dist_dir)
|
||||
|
|
|
@ -7,9 +7,13 @@ cwd = GetCurrentDir()
|
|||
objs = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
||||
for item in list:
|
||||
path = os.path.join(cwd, item)
|
||||
if item == 'libraries' or not os.path.isdir(path):
|
||||
continue
|
||||
|
||||
sconscript_path = os.path.join(path, 'SConscript')
|
||||
if os.path.isfile(sconscript_path):
|
||||
objs.extend(SConscript(os.path.join(item, 'SConscript')))
|
||||
|
||||
Return('objs')
|
||||
|
|
|
@ -24,6 +24,8 @@ BUILD = 'debug'
|
|||
CORE = 'risc-v'
|
||||
MAP_FILE = 'rtthread.map'
|
||||
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
if os.path.exists('./libraries'):
|
||||
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
TARGET_NAME = 'rtthread.bin'
|
||||
|
||||
#------- GCC settings ----------------------------------------------------------
|
||||
|
@ -93,6 +95,6 @@ if PLATFORM == 'gcc':
|
|||
def dist_handle(BSP_ROOT, dist_dir):
|
||||
import sys
|
||||
cwd_path = os.getcwd()
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
|
||||
from sdk_dist import dist_do_building
|
||||
dist_do_building(BSP_ROOT, dist_dir)
|
||||
|
|
|
@ -7,9 +7,13 @@ cwd = GetCurrentDir()
|
|||
objs = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
||||
for item in list:
|
||||
path = os.path.join(cwd, item)
|
||||
if item == 'libraries' or not os.path.isdir(path):
|
||||
continue
|
||||
|
||||
sconscript_path = os.path.join(path, 'SConscript')
|
||||
if os.path.isfile(sconscript_path):
|
||||
objs.extend(SConscript(os.path.join(item, 'SConscript')))
|
||||
|
||||
Return('objs')
|
||||
|
|
|
@ -24,6 +24,8 @@ BUILD = 'debug'
|
|||
CORE = 'risc-v'
|
||||
MAP_FILE = 'rtthread.map'
|
||||
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
if os.path.exists('./libraries'):
|
||||
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
TARGET_NAME = 'rtthread.bin'
|
||||
|
||||
#------- GCC settings ----------------------------------------------------------
|
||||
|
@ -92,6 +94,6 @@ if PLATFORM == 'gcc':
|
|||
def dist_handle(BSP_ROOT, dist_dir):
|
||||
import sys
|
||||
cwd_path = os.getcwd()
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
|
||||
from sdk_dist import dist_do_building
|
||||
dist_do_building(BSP_ROOT, dist_dir)
|
||||
|
|
|
@ -7,9 +7,13 @@ cwd = GetCurrentDir()
|
|||
objs = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
||||
for item in list:
|
||||
path = os.path.join(cwd, item)
|
||||
if item == 'libraries' or not os.path.isdir(path):
|
||||
continue
|
||||
|
||||
sconscript_path = os.path.join(path, 'SConscript')
|
||||
if os.path.isfile(sconscript_path):
|
||||
objs.extend(SConscript(os.path.join(item, 'SConscript')))
|
||||
|
||||
Return('objs')
|
||||
|
|
|
@ -24,6 +24,8 @@ BUILD = 'debug'
|
|||
CORE = 'risc-v'
|
||||
MAP_FILE = 'rtthread.map'
|
||||
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
if os.path.exists('./libraries'):
|
||||
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
TARGET_NAME = 'rtthread.bin'
|
||||
|
||||
#------- GCC settings ----------------------------------------------------------
|
||||
|
@ -92,6 +94,6 @@ if PLATFORM == 'gcc':
|
|||
def dist_handle(BSP_ROOT, dist_dir):
|
||||
import sys
|
||||
cwd_path = os.getcwd()
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
|
||||
from sdk_dist import dist_do_building
|
||||
dist_do_building(BSP_ROOT, dist_dir)
|
||||
|
|
|
@ -7,9 +7,13 @@ cwd = GetCurrentDir()
|
|||
objs = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
||||
for item in list:
|
||||
path = os.path.join(cwd, item)
|
||||
if item == 'libraries' or not os.path.isdir(path):
|
||||
continue
|
||||
|
||||
sconscript_path = os.path.join(path, 'SConscript')
|
||||
if os.path.isfile(sconscript_path):
|
||||
objs.extend(SConscript(os.path.join(item, 'SConscript')))
|
||||
|
||||
Return('objs')
|
||||
|
|
|
@ -24,6 +24,8 @@ BUILD = 'debug'
|
|||
CORE = 'risc-v'
|
||||
MAP_FILE = 'rtthread.map'
|
||||
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
if os.path.exists('./libraries'):
|
||||
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
TARGET_NAME = 'rtthread.bin'
|
||||
|
||||
#------- GCC settings ----------------------------------------------------------
|
||||
|
|
|
@ -7,9 +7,13 @@ cwd = GetCurrentDir()
|
|||
objs = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
||||
for item in list:
|
||||
path = os.path.join(cwd, item)
|
||||
if item == 'libraries' or not os.path.isdir(path):
|
||||
continue
|
||||
|
||||
sconscript_path = os.path.join(path, 'SConscript')
|
||||
if os.path.isfile(sconscript_path):
|
||||
objs.extend(SConscript(os.path.join(item, 'SConscript')))
|
||||
|
||||
Return('objs')
|
||||
|
|
|
@ -24,6 +24,8 @@ BUILD = 'debug'
|
|||
CORE = 'risc-v'
|
||||
MAP_FILE = 'rtthread.map'
|
||||
LINK_FILE = '../../libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
if os.path.exists('./libraries'):
|
||||
LINK_FILE = './libraries/xuantie_libraries/chip_riscv_dummy/gcc_flash_xiaohui.ld'
|
||||
TARGET_NAME = 'rtthread.bin'
|
||||
|
||||
#------- GCC settings ----------------------------------------------------------
|
||||
|
@ -92,6 +94,6 @@ if PLATFORM == 'gcc':
|
|||
def dist_handle(BSP_ROOT, dist_dir):
|
||||
import sys
|
||||
cwd_path = os.getcwd()
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), '../tools'))
|
||||
from sdk_dist import dist_do_building
|
||||
dist_do_building(BSP_ROOT, dist_dir)
|
||||
|
|
Loading…
Reference in New Issue