mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-08 13:11:09 +08:00
[bsp][stm32] modify sconstruct
This commit is contained in:
parent
968110ffd6
commit
6df6a7519a
@ -32,25 +32,27 @@ if rtconfig.PLATFORM == 'iar':
|
|||||||
Export('RTT_ROOT')
|
Export('RTT_ROOT')
|
||||||
Export('rtconfig')
|
Export('rtconfig')
|
||||||
|
|
||||||
# prepare building environment
|
|
||||||
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
|
||||||
|
|
||||||
SDK_ROOT = os.path.abspath('./')
|
SDK_ROOT = os.path.abspath('./')
|
||||||
bsp_vdir = 'build'
|
|
||||||
|
|
||||||
if os.path.exists(SDK_ROOT + '/libraries'):
|
if os.path.exists(SDK_ROOT + '/libraries'):
|
||||||
libraries_path_prefix = SDK_ROOT + '/libraries/'
|
libraries_path_prefix = SDK_ROOT + '/libraries'
|
||||||
else:
|
else:
|
||||||
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries/'
|
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
|
||||||
|
|
||||||
|
SDK_LIB = libraries_path_prefix
|
||||||
|
Export('SDK_LIB')
|
||||||
|
|
||||||
|
# prepare building environment
|
||||||
|
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
|
||||||
|
|
||||||
# include libraries
|
# include libraries
|
||||||
objs.extend(SConscript(libraries_path_prefix + stm32_library + '/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
|
||||||
|
|
||||||
# include drivers
|
# include drivers
|
||||||
objs.extend(SConscript(libraries_path_prefix + '/HAL_Drivers/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
@ -32,24 +32,27 @@ if rtconfig.PLATFORM == 'iar':
|
|||||||
Export('RTT_ROOT')
|
Export('RTT_ROOT')
|
||||||
Export('rtconfig')
|
Export('rtconfig')
|
||||||
|
|
||||||
# prepare building environment
|
|
||||||
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
|
||||||
|
|
||||||
SDK_ROOT = os.path.abspath('./')
|
SDK_ROOT = os.path.abspath('./')
|
||||||
|
|
||||||
if os.path.exists(SDK_ROOT + '/libraries'):
|
if os.path.exists(SDK_ROOT + '/libraries'):
|
||||||
libraries_path_prefix = SDK_ROOT + '/libraries/'
|
libraries_path_prefix = SDK_ROOT + '/libraries'
|
||||||
else:
|
else:
|
||||||
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries/'
|
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
|
||||||
|
|
||||||
|
SDK_LIB = libraries_path_prefix
|
||||||
|
Export('SDK_LIB')
|
||||||
|
|
||||||
|
# prepare building environment
|
||||||
|
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
|
||||||
|
|
||||||
# include libraries
|
# include libraries
|
||||||
objs.extend(SConscript(libraries_path_prefix + stm32_library + '/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
|
||||||
|
|
||||||
# include drivers
|
# include drivers
|
||||||
objs.extend(SConscript(libraries_path_prefix + '/HAL_Drivers/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
@ -32,24 +32,27 @@ if rtconfig.PLATFORM == 'iar':
|
|||||||
Export('RTT_ROOT')
|
Export('RTT_ROOT')
|
||||||
Export('rtconfig')
|
Export('rtconfig')
|
||||||
|
|
||||||
# prepare building environment
|
|
||||||
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
|
||||||
|
|
||||||
SDK_ROOT = os.path.abspath('./')
|
SDK_ROOT = os.path.abspath('./')
|
||||||
|
|
||||||
if os.path.exists(SDK_ROOT + '/libraries'):
|
if os.path.exists(SDK_ROOT + '/libraries'):
|
||||||
libraries_path_prefix = SDK_ROOT + '/libraries/'
|
libraries_path_prefix = SDK_ROOT + '/libraries'
|
||||||
else:
|
else:
|
||||||
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries/'
|
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
|
||||||
|
|
||||||
stm32_library = 'STM32FL4xx_HAL'
|
SDK_LIB = libraries_path_prefix
|
||||||
|
Export('SDK_LIB')
|
||||||
|
|
||||||
|
# prepare building environment
|
||||||
|
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
||||||
|
|
||||||
|
stm32_library = 'STM32L4xx_HAL'
|
||||||
rtconfig.BSP_LIBRARY_TYPE = stm32_library
|
rtconfig.BSP_LIBRARY_TYPE = stm32_library
|
||||||
|
|
||||||
# include libraries
|
# include libraries
|
||||||
objs.extend(SConscript(libraries_path_prefix + stm32_library + '/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
|
||||||
|
|
||||||
# include drivers
|
# include drivers
|
||||||
objs.extend(SConscript(libraries_path_prefix + '/HAL_Drivers/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
@ -32,25 +32,27 @@ if rtconfig.PLATFORM == 'iar':
|
|||||||
Export('RTT_ROOT')
|
Export('RTT_ROOT')
|
||||||
Export('rtconfig')
|
Export('rtconfig')
|
||||||
|
|
||||||
# prepare building environment
|
|
||||||
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
|
||||||
|
|
||||||
SDK_ROOT = os.path.abspath('./')
|
SDK_ROOT = os.path.abspath('./')
|
||||||
bsp_vdir = 'build'
|
|
||||||
|
|
||||||
if os.path.exists(SDK_ROOT + '/libraries'):
|
if os.path.exists(SDK_ROOT + '/libraries'):
|
||||||
libraries_path_prefix = SDK_ROOT + '/libraries/'
|
libraries_path_prefix = SDK_ROOT + '/libraries'
|
||||||
else:
|
else:
|
||||||
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries/'
|
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
|
||||||
|
|
||||||
|
SDK_LIB = libraries_path_prefix
|
||||||
|
Export('SDK_LIB')
|
||||||
|
|
||||||
|
# prepare building environment
|
||||||
|
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
|
||||||
|
|
||||||
# include libraries
|
# include libraries
|
||||||
objs.extend(SConscript(libraries_path_prefix + stm32_library + '/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
|
||||||
|
|
||||||
# include drivers
|
# include drivers
|
||||||
objs.extend(SConscript(libraries_path_prefix + '/HAL_Drivers/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
@ -32,25 +32,27 @@ if rtconfig.PLATFORM == 'iar':
|
|||||||
Export('RTT_ROOT')
|
Export('RTT_ROOT')
|
||||||
Export('rtconfig')
|
Export('rtconfig')
|
||||||
|
|
||||||
# prepare building environment
|
|
||||||
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
|
||||||
|
|
||||||
SDK_ROOT = os.path.abspath('./')
|
SDK_ROOT = os.path.abspath('./')
|
||||||
bsp_vdir = 'build'
|
|
||||||
|
|
||||||
if os.path.exists(SDK_ROOT + '/libraries'):
|
if os.path.exists(SDK_ROOT + '/libraries'):
|
||||||
libraries_path_prefix = SDK_ROOT + '/libraries/'
|
libraries_path_prefix = SDK_ROOT + '/libraries'
|
||||||
else:
|
else:
|
||||||
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries/'
|
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
|
||||||
|
|
||||||
|
SDK_LIB = libraries_path_prefix
|
||||||
|
Export('SDK_LIB')
|
||||||
|
|
||||||
|
# prepare building environment
|
||||||
|
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
|
||||||
|
|
||||||
# include libraries
|
# include libraries
|
||||||
objs.extend(SConscript(libraries_path_prefix + stm32_library + '/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
|
||||||
|
|
||||||
# include drivers
|
# include drivers
|
||||||
objs.extend(SConscript(libraries_path_prefix + '/HAL_Drivers/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
@ -32,24 +32,27 @@ if rtconfig.PLATFORM == 'iar':
|
|||||||
Export('RTT_ROOT')
|
Export('RTT_ROOT')
|
||||||
Export('rtconfig')
|
Export('rtconfig')
|
||||||
|
|
||||||
# prepare building environment
|
|
||||||
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
|
||||||
|
|
||||||
SDK_ROOT = os.path.abspath('./')
|
SDK_ROOT = os.path.abspath('./')
|
||||||
|
|
||||||
if os.path.exists(SDK_ROOT + '/libraries'):
|
if os.path.exists(SDK_ROOT + '/libraries'):
|
||||||
libraries_path_prefix = SDK_ROOT + '/libraries/'
|
libraries_path_prefix = SDK_ROOT + '/libraries'
|
||||||
else:
|
else:
|
||||||
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries/'
|
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
|
||||||
|
|
||||||
|
SDK_LIB = libraries_path_prefix
|
||||||
|
Export('SDK_LIB')
|
||||||
|
|
||||||
|
# prepare building environment
|
||||||
|
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
|
||||||
|
|
||||||
# include libraries
|
# include libraries
|
||||||
objs.extend(SConscript(libraries_path_prefix + stm32_library + '/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
|
||||||
|
|
||||||
# include drivers
|
# include drivers
|
||||||
objs.extend(SConscript(libraries_path_prefix + '/HAL_Drivers/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
@ -32,24 +32,27 @@ if rtconfig.PLATFORM == 'iar':
|
|||||||
Export('RTT_ROOT')
|
Export('RTT_ROOT')
|
||||||
Export('rtconfig')
|
Export('rtconfig')
|
||||||
|
|
||||||
# prepare building environment
|
|
||||||
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
|
||||||
|
|
||||||
SDK_ROOT = os.path.abspath('./')
|
SDK_ROOT = os.path.abspath('./')
|
||||||
|
|
||||||
if os.path.exists(SDK_ROOT + '/libraries'):
|
if os.path.exists(SDK_ROOT + '/libraries'):
|
||||||
libraries_path_prefix = SDK_ROOT + '/libraries/'
|
libraries_path_prefix = SDK_ROOT + '/libraries'
|
||||||
else:
|
else:
|
||||||
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries/'
|
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
|
||||||
|
|
||||||
|
SDK_LIB = libraries_path_prefix
|
||||||
|
Export('SDK_LIB')
|
||||||
|
|
||||||
|
# prepare building environment
|
||||||
|
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
|
||||||
|
|
||||||
# include libraries
|
# include libraries
|
||||||
objs.extend(SConscript(libraries_path_prefix + stm32_library + '/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
|
||||||
|
|
||||||
# include drivers
|
# include drivers
|
||||||
objs.extend(SConscript(libraries_path_prefix + '/HAL_Drivers/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
@ -32,24 +32,27 @@ if rtconfig.PLATFORM == 'iar':
|
|||||||
Export('RTT_ROOT')
|
Export('RTT_ROOT')
|
||||||
Export('rtconfig')
|
Export('rtconfig')
|
||||||
|
|
||||||
# prepare building environment
|
|
||||||
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
|
||||||
|
|
||||||
SDK_ROOT = os.path.abspath('./')
|
SDK_ROOT = os.path.abspath('./')
|
||||||
|
|
||||||
if os.path.exists(SDK_ROOT + '/libraries'):
|
if os.path.exists(SDK_ROOT + '/libraries'):
|
||||||
libraries_path_prefix = SDK_ROOT + '/libraries/'
|
libraries_path_prefix = SDK_ROOT + '/libraries'
|
||||||
else:
|
else:
|
||||||
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries/'
|
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
|
||||||
|
|
||||||
|
SDK_LIB = libraries_path_prefix
|
||||||
|
Export('SDK_LIB')
|
||||||
|
|
||||||
|
# prepare building environment
|
||||||
|
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
|
||||||
|
|
||||||
# include libraries
|
# include libraries
|
||||||
objs.extend(SConscript(libraries_path_prefix + stm32_library + '/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript')))
|
||||||
|
|
||||||
# include drivers
|
# include drivers
|
||||||
objs.extend(SConscript(libraries_path_prefix + '/HAL_Drivers/SConscript'))
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user