diff --git a/bsp/stm32/stm32l412-st-nucleo/SConstruct b/bsp/stm32/stm32l412-st-nucleo/SConstruct index 1560b1341c..3a96b55123 100644 --- a/bsp/stm32/stm32l412-st-nucleo/SConstruct +++ b/bsp/stm32/stm32l412-st-nucleo/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l412-st-nucleo/board/SConscript b/bsp/stm32/stm32l412-st-nucleo/board/SConscript index b462b29a2a..2b75e25daf 100644 --- a/bsp/stm32/stm32l412-st-nucleo/board/SConscript +++ b/bsp/stm32/stm32l412-st-nucleo/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -15,25 +11,8 @@ CubeMX_Config/Src/stm32l4xx_hal_msp.c path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l412xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l412xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l412xx.s'] - -# STM32L412xx || STM32L422xx || STM32L431xx -# STM32L432xx || STM32L433xx || STM32L442xx -# STM32L443xx || STM32L451xx || STM32L452xx -# STM32L462xx || STM32L471xx || STM32L475xx -# STM32L476xx || STM32L485xx || STM32L486xx -# STM32L496xx || STM32L4A6xx || STM32L4R5xx -# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx -# STM32L4S7xx || STM32L4S9xx -# You can select chips from the list above CPPDEFINES = ['STM32L412xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l431-BearPi/SConstruct b/bsp/stm32/stm32l431-BearPi/SConstruct index 1560b1341c..914be2d006 100644 --- a/bsp/stm32/stm32l431-BearPi/SConstruct +++ b/bsp/stm32/stm32l431-BearPi/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l431-BearPi/board/SConscript b/bsp/stm32/stm32l431-BearPi/board/SConscript index 2c0c4321fc..5c52c0a3fb 100644 --- a/bsp/stm32/stm32l431-BearPi/board/SConscript +++ b/bsp/stm32/stm32l431-BearPi/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -21,25 +17,9 @@ if GetDepend('BSP_USING_MPU6050'): path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] path += [cwd + '/ports/lcd'] -startup_path_prefix = SDK_LIB -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l431xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l431xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l431xx.s'] - -# STM32L412xx || STM32L422xx || STM32L431xx -# STM32L432xx || STM32L433xx || STM32L442xx -# STM32L443xx || STM32L451xx || STM32L452xx -# STM32L462xx || STM32L471xx || STM32L475xx -# STM32L476xx || STM32L485xx || STM32L486xx -# STM32L496xx || STM32L4A6xx || STM32L4R5xx -# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx -# STM32L4S7xx || STM32L4S9xx -# You can select chips from the list above CPPDEFINES = ['STM32L431xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l431-tencentos-tiny-EVB_MX+/SConstruct b/bsp/stm32/stm32l431-tencentos-tiny-EVB_MX+/SConstruct index b665de67e7..254f545185 100644 --- a/bsp/stm32/stm32l431-tencentos-tiny-EVB_MX+/SConstruct +++ b/bsp/stm32/stm32l431-tencentos-tiny-EVB_MX+/SConstruct @@ -45,19 +45,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l431-tencentos-tiny-EVB_MX+/board/SConscript b/bsp/stm32/stm32l431-tencentos-tiny-EVB_MX+/board/SConscript index 2e7cf9c4a8..5bb0f75a5c 100644 --- a/bsp/stm32/stm32l431-tencentos-tiny-EVB_MX+/board/SConscript +++ b/bsp/stm32/stm32l431-tencentos-tiny-EVB_MX+/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -15,25 +11,8 @@ CubeMX_Config/Core/Src/stm32l4xx_hal_msp.c path = [cwd] path += [cwd + '/CubeMX_Config/Core/Inc'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l431xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l431xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l431xx.s'] - -# STM32L412xx || STM32L422xx || STM32L431xx -# STM32L432xx || STM32L433xx || STM32L442xx -# STM32L443xx || STM32L451xx || STM32L452xx -# STM32L462xx || STM32L471xx || STM32L475xx -# STM32L476xx || STM32L485xx || STM32L486xx -# STM32L496xx || STM32L4A6xx || STM32L4R5xx -# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx -# STM32L4S7xx || STM32L4S9xx -# You can select chips from the list above CPPDEFINES = ['STM32L431xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l432-st-nucleo/SConstruct b/bsp/stm32/stm32l432-st-nucleo/SConstruct index 1560b1341c..3a96b55123 100644 --- a/bsp/stm32/stm32l432-st-nucleo/SConstruct +++ b/bsp/stm32/stm32l432-st-nucleo/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l432-st-nucleo/board/SConscript b/bsp/stm32/stm32l432-st-nucleo/board/SConscript index 403ab6a8be..faff6d3069 100644 --- a/bsp/stm32/stm32l432-st-nucleo/board/SConscript +++ b/bsp/stm32/stm32l432-st-nucleo/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -15,25 +11,8 @@ CubeMX_Config/Src/stm32l4xx_hal_msp.c path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l432xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l432xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l432xx.s'] - -# STM32L412xx || STM32L422xx || STM32L431xx -# STM32L432xx || STM32L433xx || STM32L442xx -# STM32L443xx || STM32L451xx || STM32L452xx -# STM32L462xx || STM32L471xx || STM32L475xx -# STM32L476xx || STM32L485xx || STM32L486xx -# STM32L496xx || STM32L4A6xx || STM32L4R5xx -# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx -# STM32L4S7xx || STM32L4S9xx -# You can select chips from the list above CPPDEFINES = ['STM32L432xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l433-ali-startkit/SConstruct b/bsp/stm32/stm32l433-ali-startkit/SConstruct index 1560b1341c..3a96b55123 100644 --- a/bsp/stm32/stm32l433-ali-startkit/SConstruct +++ b/bsp/stm32/stm32l433-ali-startkit/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l433-ali-startkit/board/SConscript b/bsp/stm32/stm32l433-ali-startkit/board/SConscript index 4e52f1eec1..2679aa97b8 100644 --- a/bsp/stm32/stm32l433-ali-startkit/board/SConscript +++ b/bsp/stm32/stm32l433-ali-startkit/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -15,16 +11,8 @@ CubeMX_Config/Core/Src/stm32l4xx_hal_msp.c path = [cwd] path += [cwd + '/CubeMX_Config/Core/Inc'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l433xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l433xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l433xx.s'] - CPPDEFINES = ['STM32L433xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l433-st-nucleo/SConstruct b/bsp/stm32/stm32l433-st-nucleo/SConstruct index 1560b1341c..3a96b55123 100644 --- a/bsp/stm32/stm32l433-st-nucleo/SConstruct +++ b/bsp/stm32/stm32l433-st-nucleo/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l433-st-nucleo/board/SConscript b/bsp/stm32/stm32l433-st-nucleo/board/SConscript index 48fff8f9b9..4a96cbe3b7 100644 --- a/bsp/stm32/stm32l433-st-nucleo/board/SConscript +++ b/bsp/stm32/stm32l433-st-nucleo/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -15,25 +11,8 @@ CubeMX_Config/Src/stm32l4xx_hal_msp.c path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l433xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l433xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l433xx.s'] - -# STM32L412xx || STM32L422xx || STM32L431xx -# STM32L432xx || STM32L433xx || STM32L442xx -# STM32L443xx || STM32L451xx || STM32L452xx -# STM32L462xx || STM32L471xx || STM32L475xx -# STM32L476xx || STM32L485xx || STM32L486xx -# STM32L496xx || STM32L4A6xx || STM32L4R5xx -# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx -# STM32L4S7xx || STM32L4S9xx -# You can select chips from the list above CPPDEFINES = ['STM32L433xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l452-st-nucleo/SConstruct b/bsp/stm32/stm32l452-st-nucleo/SConstruct index 1560b1341c..3a96b55123 100644 --- a/bsp/stm32/stm32l452-st-nucleo/SConstruct +++ b/bsp/stm32/stm32l452-st-nucleo/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l452-st-nucleo/board/SConscript b/bsp/stm32/stm32l452-st-nucleo/board/SConscript index 7e401c2fe6..d1f4d4e0b6 100644 --- a/bsp/stm32/stm32l452-st-nucleo/board/SConscript +++ b/bsp/stm32/stm32l452-st-nucleo/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -16,25 +12,8 @@ path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] path += [cwd + '/ports'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l452xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l452xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l452xx.s'] - -# STM32L412xx || STM32L422xx || STM32L431xx -# STM32L432xx || STM32L433xx || STM32L442xx -# STM32L443xx || STM32L451xx || STM32L452xx -# STM32L462xx || STM32L471xx || STM32L475xx -# STM32L476xx || STM32L485xx || STM32L486xx -# STM32L496xx || STM32L4A6xx || STM32L4R5xx -# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx -# STM32L4S7xx || STM32L4S9xx -# You can select chips from the list above CPPDEFINES = ['STM32L452xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l475-atk-pandora/SConstruct b/bsp/stm32/stm32l475-atk-pandora/SConstruct index 0f1b66be80..e7583feae9 100644 --- a/bsp/stm32/stm32l475-atk-pandora/SConstruct +++ b/bsp/stm32/stm32l475-atk-pandora/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/HAL_Drivers', duplicate=0)) objs.extend(SConscript(os.path.join(os.getcwd(), 'board', 'ports', 'SConscript'))) diff --git a/bsp/stm32/stm32l475-atk-pandora/board/SConscript b/bsp/stm32/stm32l475-atk-pandora/board/SConscript index 9c8cad45d3..5dd6c3c21f 100644 --- a/bsp/stm32/stm32l475-atk-pandora/board/SConscript +++ b/bsp/stm32/stm32l475-atk-pandora/board/SConscript @@ -1,9 +1,6 @@ import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -45,6 +42,7 @@ if not GetDepend(['RT_USING_NANO']): path += [os.path.join(cwd, 'ports', 'audio')] CPPDEFINES = ['STM32L475xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l475-st-discovery/SConstruct b/bsp/stm32/stm32l475-st-discovery/SConstruct index d14ee65eeb..9cf3fc6180 100644 --- a/bsp/stm32/stm32l475-st-discovery/SConstruct +++ b/bsp/stm32/stm32l475-st-discovery/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l475-st-discovery/board/SConscript b/bsp/stm32/stm32l475-st-discovery/board/SConscript index 258ec153ec..9822bafe3a 100644 --- a/bsp/stm32/stm32l475-st-discovery/board/SConscript +++ b/bsp/stm32/stm32l475-st-discovery/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -21,17 +17,8 @@ path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] path += [cwd + '/ports'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l475xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l475xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l475xx.s'] - - CPPDEFINES = ['STM32L475xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l476-st-nucleo/SConstruct b/bsp/stm32/stm32l476-st-nucleo/SConstruct index 1560b1341c..3a96b55123 100644 --- a/bsp/stm32/stm32l476-st-nucleo/SConstruct +++ b/bsp/stm32/stm32l476-st-nucleo/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l476-st-nucleo/board/SConscript b/bsp/stm32/stm32l476-st-nucleo/board/SConscript index 842486bdf9..98836de93a 100644 --- a/bsp/stm32/stm32l476-st-nucleo/board/SConscript +++ b/bsp/stm32/stm32l476-st-nucleo/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -22,16 +18,8 @@ path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] path += [cwd + '/ports'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l476xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l476xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l476xx.s'] - CPPDEFINES = ['STM32L476xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l496-ali-developer/SConstruct b/bsp/stm32/stm32l496-ali-developer/SConstruct index 1560b1341c..3a96b55123 100644 --- a/bsp/stm32/stm32l496-ali-developer/SConstruct +++ b/bsp/stm32/stm32l496-ali-developer/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l496-ali-developer/board/SConscript b/bsp/stm32/stm32l496-ali-developer/board/SConscript index c3920efae1..09a570325d 100644 --- a/bsp/stm32/stm32l496-ali-developer/board/SConscript +++ b/bsp/stm32/stm32l496-ali-developer/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -25,16 +21,8 @@ path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] path += [cwd + '/ports'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l496xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l496xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l496xx.s'] - CPPDEFINES = ['STM32L496xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l496-st-discovery/SConstruct b/bsp/stm32/stm32l496-st-discovery/SConstruct index 1560b1341c..3a96b55123 100644 --- a/bsp/stm32/stm32l496-st-discovery/SConstruct +++ b/bsp/stm32/stm32l496-st-discovery/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l496-st-discovery/board/SConscript b/bsp/stm32/stm32l496-st-discovery/board/SConscript index fda771e7ad..32040bd020 100644 --- a/bsp/stm32/stm32l496-st-discovery/board/SConscript +++ b/bsp/stm32/stm32l496-st-discovery/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -15,25 +11,8 @@ CubeMX_Config/Src/stm32l4xx_hal_msp.c path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l496xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l496xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l496xx.s'] - -# STM32L412xx || STM32L422xx || STM32L431xx -# STM32L432xx || STM32L433xx || STM32L442xx -# STM32L443xx || STM32L451xx || STM32L452xx -# STM32L462xx || STM32L471xx || STM32L475xx -# STM32L476xx || STM32L485xx || STM32L486xx -# STM32L496xx || STM32L4A6xx || STM32L4R5xx -# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx -# STM32L4S7xx || STM32L4S9xx -# You can select chips from the list above CPPDEFINES = ['STM32L496xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l496-st-nucleo/SConstruct b/bsp/stm32/stm32l496-st-nucleo/SConstruct index 1560b1341c..3a96b55123 100644 --- a/bsp/stm32/stm32l496-st-nucleo/SConstruct +++ b/bsp/stm32/stm32l496-st-nucleo/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l496-st-nucleo/board/SConscript b/bsp/stm32/stm32l496-st-nucleo/board/SConscript index 37998ac073..99630cb0d2 100644 --- a/bsp/stm32/stm32l496-st-nucleo/board/SConscript +++ b/bsp/stm32/stm32l496-st-nucleo/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -19,16 +15,8 @@ path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] path += [cwd + '/ports'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l496xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l496xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l496xx.s'] - CPPDEFINES = ['STM32L496xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l4r5-st-nucleo/SConstruct b/bsp/stm32/stm32l4r5-st-nucleo/SConstruct index d85b31f894..e7a6ff23d9 100644 --- a/bsp/stm32/stm32l4r5-st-nucleo/SConstruct +++ b/bsp/stm32/stm32l4r5-st-nucleo/SConstruct @@ -40,19 +40,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l4r5-st-nucleo/board/SConscript b/bsp/stm32/stm32l4r5-st-nucleo/board/SConscript index 5fe82b937f..c047dbd0a7 100644 --- a/bsp/stm32/stm32l4r5-st-nucleo/board/SConscript +++ b/bsp/stm32/stm32l4r5-st-nucleo/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -15,25 +11,8 @@ CubeMX_Config/Src/stm32l4xx_hal_msp.c path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l4r5xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l4r5xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l4r5xx.s'] - -# STM32L412xx || STM32L422xx || STM32L431xx -# STM32L432xx || STM32L433xx || STM32L442xx -# STM32L443xx || STM32L451xx || STM32L452xx -# STM32L462xx || STM32L471xx || STM32L475xx -# STM32L476xx || STM32L485xx || STM32L486xx -# STM32L496xx || STM32L4A6xx || STM32L4R5xx -# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx -# STM32L4S7xx || STM32L4S9xx -# You can select chips from the list above CPPDEFINES = ['STM32L4R5xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l4r9-st-eval/SConstruct b/bsp/stm32/stm32l4r9-st-eval/SConstruct index d14ee65eeb..9cf3fc6180 100644 --- a/bsp/stm32/stm32l4r9-st-eval/SConstruct +++ b/bsp/stm32/stm32l4r9-st-eval/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l4r9-st-eval/board/SConscript b/bsp/stm32/stm32l4r9-st-eval/board/SConscript index 9e4f7b0775..8e10404da0 100644 --- a/bsp/stm32/stm32l4r9-st-eval/board/SConscript +++ b/bsp/stm32/stm32l4r9-st-eval/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -26,25 +22,8 @@ path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] path += [cwd + '/ports/include'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l4r9xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l4r9xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l4r9xx.s'] - -# STM32L412xx || STM32L422xx || STM32L431xx -# STM32L432xx || STM32L433xx || STM32L442xx -# STM32L443xx || STM32L451xx || STM32L452xx -# STM32L462xx || STM32L471xx || STM32L475xx -# STM32L476xx || STM32L485xx || STM32L486xx -# STM32L496xx || STM32L4A6xx || STM32L4R5xx -# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx -# STM32L4S7xx || STM32L4S9xx -# You can select chips from the list above CPPDEFINES = ['STM32L4R9xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group') diff --git a/bsp/stm32/stm32l4r9-st-sensortile-box/SConstruct b/bsp/stm32/stm32l4r9-st-sensortile-box/SConstruct index d14ee65eeb..1393d269ee 100644 --- a/bsp/stm32/stm32l4r9-st-sensortile-box/SConstruct +++ b/bsp/stm32/stm32l4r9-st-sensortile-box/SConstruct @@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'): else: 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 = 'STM32L4xx_HAL' -rtconfig.BSP_LIBRARY_TYPE = stm32_library +rtconfig.BSP_LIBRARY_TYPE = None -# include libraries -objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0)) # include drivers -objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) +objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0)) # make a building DoBuilding(TARGET, objs) diff --git a/bsp/stm32/stm32l4r9-st-sensortile-box/board/SConscript b/bsp/stm32/stm32l4r9-st-sensortile-box/board/SConscript index e25359393b..a349780f65 100644 --- a/bsp/stm32/stm32l4r9-st-sensortile-box/board/SConscript +++ b/bsp/stm32/stm32l4r9-st-sensortile-box/board/SConscript @@ -1,9 +1,5 @@ -import os -import rtconfig from building import * -Import('SDK_LIB') - cwd = GetCurrentDir() # add general drivers @@ -16,25 +12,8 @@ CubeMX_Config/Core/Src/stm32l4xx_hal_msp.c path = [cwd] path += [cwd + '/CubeMX_Config/Core/Inc'] -startup_path_prefix = SDK_LIB - -if rtconfig.PLATFORM in ['gcc']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l4r9xx.s'] -elif rtconfig.PLATFORM in ['armcc', 'armclang']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l4r9xx.s'] -elif rtconfig.PLATFORM in ['iccarm']: - src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l4r9xx.s'] - -# STM32L412xx || STM32L422xx || STM32L431xx -# STM32L432xx || STM32L433xx || STM32L442xx -# STM32L443xx || STM32L451xx || STM32L452xx -# STM32L462xx || STM32L471xx || STM32L475xx -# STM32L476xx || STM32L485xx || STM32L486xx -# STM32L496xx || STM32L4A6xx || STM32L4R5xx -# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx -# STM32L4S7xx || STM32L4S9xx -# You can select chips from the list above CPPDEFINES = ['STM32L4R9xx'] + group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) Return('group')