4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-20 05:43:32 +08:00

[bsp/stm32] improve build output.

This commit is contained in:
guozhanxin 2022-03-29 23:15:45 +08:00
parent ce602a6e4a
commit 921247b420
87 changed files with 1154 additions and 209 deletions

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F0xx_HAL' stm32_library = 'STM32F0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F2xx_HAL' stm32_library = 'STM32F2xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F3xx_HAL' stm32_library = 'STM32F3xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
# include drivers bsp_vdir = 'build'
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L1xx_HAL' stm32_library = 'STM32L1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L5xx_HAL' stm32_library = 'STM32L5xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32MPxx_HAL' stm32_library = 'STM32MPxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32WBxx_HAL' stm32_library = 'STM32WBxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rt-thread_acm32f030.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F0xx_HAL' stm32_library = 'STM32F0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F0xx_HAL' stm32_library = 'STM32F0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rt-thread.map']) env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F1xx_HAL' stm32_library = 'STM32F1xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F2xx_HAL' stm32_library = 'STM32F2xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F3xx_HAL' stm32_library = 'STM32F3xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,14 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F4xx_HAL' stm32_library = 'STM32F4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
# include ports bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
objs.extend(SConscript(os.path.join(os.getcwd(), 'board', 'ports', 'SConscript'))) if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32F7xx_HAL' stm32_library = 'STM32F7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32G0xx_HAL' stm32_library = 'STM32G0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32G0xx_HAL' stm32_library = 'STM32G0xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32G4xx_HAL' stm32_library = 'STM32G4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32G4xx_HAL' stm32_library = 'STM32G4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
# include drivers bsp_vdir = 'build'
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
# include drivers bsp_vdir = 'build'
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
# include drivers bsp_vdir = 'build'
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
# include drivers bsp_vdir = 'build'
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32H7xx_HAL' stm32_library = 'STM32H7xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
# include drivers bsp_vdir = 'build'
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,20 +41,31 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
# prepare building environment # prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L0xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,20 +41,31 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
# prepare building environment # prepare building environment
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L0xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,13 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
objs.extend(SConscript(os.path.join(os.getcwd(), 'board', 'ports', 'SConscript'))) bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -53,3 +53,4 @@ CPPDEFINES = ['STM32L475xx']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group') Return('group')

View File

@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -17,6 +17,7 @@ except:
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
@ -40,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -49,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -15,7 +15,7 @@ except:
print(RTT_ROOT) print(RTT_ROOT)
exit(-1) exit(-1)
TARGET = 'rtthread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[]) DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
@ -29,7 +29,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
if rtconfig.PLATFORM == 'iar': if rtconfig.PLATFORM == 'iar':
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
env.Replace(ARFLAGS = ['']) env.Replace(ARFLAGS = [''])
env.Replace(LINKCOM = env["LINKCOM"] + ' --map rtthread.map') env.Replace(LINKCOM = env["LINKCOM"] + ' --map rt-thread.map')
Export('RTT_ROOT') Export('RTT_ROOT')
Export('rtconfig') Export('rtconfig')
@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L4xx_HAL' stm32_library = 'STM32L4xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32L5xx_HAL' stm32_library = 'STM32L5xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32MPxx_HAL' stm32_library = 'STM32MPxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32MPxx_HAL' stm32_library = 'STM32MPxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32U5xx_HAL' stm32_library = 'STM32U5xx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -41,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -50,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32WBxx_HAL' stm32_library = 'STM32WBxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -17,6 +17,7 @@ except:
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
@ -40,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -49,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32WLxx_HAL' stm32_library = 'STM32WLxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)

View File

@ -17,6 +17,7 @@ except:
TARGET = 'rt-thread.' + rtconfig.TARGET_EXT TARGET = 'rt-thread.' + rtconfig.TARGET_EXT
DefaultEnvironment(tools=[])
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS, CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
@ -40,6 +41,9 @@ if os.path.exists(SDK_ROOT + '/libraries'):
else: else:
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries' libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
from utils import _make_path_relative
libraries_path_prefix = _make_path_relative(os.path.abspath('./'), libraries_path_prefix)
SDK_LIB = libraries_path_prefix SDK_LIB = libraries_path_prefix
Export('SDK_LIB') Export('SDK_LIB')
@ -49,11 +53,19 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
stm32_library = 'STM32WLxx_HAL' stm32_library = 'STM32WLxx_HAL'
rtconfig.BSP_LIBRARY_TYPE = stm32_library rtconfig.BSP_LIBRARY_TYPE = stm32_library
bsp_vdir = 'build'
# include libraries # include libraries
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'),
variant_dir=bsp_vdir + '/libraries/'+ stm32_library, duplicate=0))
# include drivers # include drivers
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'))) objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),
variant_dir=bsp_vdir + '/libraries/HAL_Drivers', duplicate=0))
bsp_port_script = os.path.join(os.getcwd(), 'board', 'ports', 'SConscript')
if os.path.isfile(bsp_port_script):
objs.extend(SConscript(bsp_port_script, variant_dir=bsp_vdir + '/board/ports', duplicate=0))
# make a building # make a building
DoBuilding(TARGET, objs) DoBuilding(TARGET, objs)