Skip to content

Commit 968da7c

Browse files
committed
[bsp][stm32l4] remove local HAL
1 parent 24efabc commit 968da7c

File tree

32 files changed

+49
-417
lines changed

32 files changed

+49
-417
lines changed

bsp/stm32/stm32l412-st-nucleo/SConstruct

+2-8
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44-
SDK_LIB = libraries_path_prefix
45-
Export('SDK_LIB')
46-
4744
# prepare building environment
4845
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
4946

50-
stm32_library = 'STM32L4xx_HAL'
51-
rtconfig.BSP_LIBRARY_TYPE = stm32_library
47+
rtconfig.BSP_LIBRARY_TYPE = None
5248

53-
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0))
5549
# include drivers
56-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0))
50+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0))
5751

5852
# make a building
5953
DoBuilding(TARGET, objs)
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import os
2-
import rtconfig
31
from building import *
42

5-
Import('SDK_LIB')
6-
73
cwd = GetCurrentDir()
84

95
# add general drivers
@@ -15,25 +11,8 @@ CubeMX_Config/Src/stm32l4xx_hal_msp.c
1511
path = [cwd]
1612
path += [cwd + '/CubeMX_Config/Inc']
1713

18-
startup_path_prefix = SDK_LIB
19-
20-
if rtconfig.PLATFORM in ['gcc']:
21-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l412xx.s']
22-
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
23-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l412xx.s']
24-
elif rtconfig.PLATFORM in ['iccarm']:
25-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l412xx.s']
26-
27-
# STM32L412xx || STM32L422xx || STM32L431xx
28-
# STM32L432xx || STM32L433xx || STM32L442xx
29-
# STM32L443xx || STM32L451xx || STM32L452xx
30-
# STM32L462xx || STM32L471xx || STM32L475xx
31-
# STM32L476xx || STM32L485xx || STM32L486xx
32-
# STM32L496xx || STM32L4A6xx || STM32L4R5xx
33-
# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx
34-
# STM32L4S7xx || STM32L4S9xx
35-
# You can select chips from the list above
3614
CPPDEFINES = ['STM32L412xx']
15+
3716
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
3817

3918
Return('group')

bsp/stm32/stm32l431-BearPi/SConstruct

+2-8
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44-
SDK_LIB = libraries_path_prefix
45-
Export('SDK_LIB')
46-
4744
# prepare building environment
4845
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
4946

50-
stm32_library = 'STM32L4xx_HAL'
51-
rtconfig.BSP_LIBRARY_TYPE = stm32_library
47+
rtconfig.BSP_LIBRARY_TYPE = None
5248

53-
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0))
5549
# include drivers
56-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0))
50+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/HAL_Drivers', duplicate=0))
5751

5852
# make a building
5953
DoBuilding(TARGET, objs)
+2-22
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import os
2-
import rtconfig
31
from building import *
42

5-
Import('SDK_LIB')
6-
73
cwd = GetCurrentDir()
84

95
# add general drivers
@@ -21,25 +17,9 @@ if GetDepend('BSP_USING_MPU6050'):
2117
path = [cwd]
2218
path += [cwd + '/CubeMX_Config/Inc']
2319
path += [cwd + '/ports/lcd']
24-
startup_path_prefix = SDK_LIB
25-
26-
if rtconfig.PLATFORM in ['gcc']:
27-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l431xx.s']
28-
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
29-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l431xx.s']
30-
elif rtconfig.PLATFORM in ['iccarm']:
31-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l431xx.s']
32-
33-
# STM32L412xx || STM32L422xx || STM32L431xx
34-
# STM32L432xx || STM32L433xx || STM32L442xx
35-
# STM32L443xx || STM32L451xx || STM32L452xx
36-
# STM32L462xx || STM32L471xx || STM32L475xx
37-
# STM32L476xx || STM32L485xx || STM32L486xx
38-
# STM32L496xx || STM32L4A6xx || STM32L4R5xx
39-
# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx
40-
# STM32L4S7xx || STM32L4S9xx
41-
# You can select chips from the list above
20+
4221
CPPDEFINES = ['STM32L431xx']
22+
4323
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
4424

4525
Return('group')

bsp/stm32/stm32l431-tencentos-tiny-EVB_MX+/SConstruct

+2-8
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,13 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4545
else:
4646
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4747

48-
SDK_LIB = libraries_path_prefix
49-
Export('SDK_LIB')
50-
5148
# prepare building environment
5249
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
5350

54-
stm32_library = 'STM32L4xx_HAL'
55-
rtconfig.BSP_LIBRARY_TYPE = stm32_library
51+
rtconfig.BSP_LIBRARY_TYPE = None
5652

57-
# include libraries
58-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0))
5953
# include drivers
60-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0))
54+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0))
6155

6256
# make a building
6357
DoBuilding(TARGET, objs)

bsp/stm32/stm32l431-tencentos-tiny-EVB_MX+/board/SConscript

+1-22
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import os
2-
import rtconfig
31
from building import *
42

5-
Import('SDK_LIB')
6-
73
cwd = GetCurrentDir()
84

95
# add general drivers
@@ -15,25 +11,8 @@ CubeMX_Config/Core/Src/stm32l4xx_hal_msp.c
1511
path = [cwd]
1612
path += [cwd + '/CubeMX_Config/Core/Inc']
1713

18-
startup_path_prefix = SDK_LIB
19-
20-
if rtconfig.PLATFORM in ['gcc']:
21-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l431xx.s']
22-
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
23-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l431xx.s']
24-
elif rtconfig.PLATFORM in ['iccarm']:
25-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l431xx.s']
26-
27-
# STM32L412xx || STM32L422xx || STM32L431xx
28-
# STM32L432xx || STM32L433xx || STM32L442xx
29-
# STM32L443xx || STM32L451xx || STM32L452xx
30-
# STM32L462xx || STM32L471xx || STM32L475xx
31-
# STM32L476xx || STM32L485xx || STM32L486xx
32-
# STM32L496xx || STM32L4A6xx || STM32L4R5xx
33-
# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx
34-
# STM32L4S7xx || STM32L4S9xx
35-
# You can select chips from the list above
3614
CPPDEFINES = ['STM32L431xx']
15+
3716
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
3817

3918
Return('group')

bsp/stm32/stm32l432-st-nucleo/SConstruct

+2-8
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44-
SDK_LIB = libraries_path_prefix
45-
Export('SDK_LIB')
46-
4744
# prepare building environment
4845
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
4946

50-
stm32_library = 'STM32L4xx_HAL'
51-
rtconfig.BSP_LIBRARY_TYPE = stm32_library
47+
rtconfig.BSP_LIBRARY_TYPE = None
5248

53-
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0))
5549
# include drivers
56-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0))
50+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0))
5751

5852
# make a building
5953
DoBuilding(TARGET, objs)
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import os
2-
import rtconfig
31
from building import *
42

5-
Import('SDK_LIB')
6-
73
cwd = GetCurrentDir()
84

95
# add general drivers
@@ -15,25 +11,8 @@ CubeMX_Config/Src/stm32l4xx_hal_msp.c
1511
path = [cwd]
1612
path += [cwd + '/CubeMX_Config/Inc']
1713

18-
startup_path_prefix = SDK_LIB
19-
20-
if rtconfig.PLATFORM in ['gcc']:
21-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l432xx.s']
22-
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
23-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l432xx.s']
24-
elif rtconfig.PLATFORM in ['iccarm']:
25-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l432xx.s']
26-
27-
# STM32L412xx || STM32L422xx || STM32L431xx
28-
# STM32L432xx || STM32L433xx || STM32L442xx
29-
# STM32L443xx || STM32L451xx || STM32L452xx
30-
# STM32L462xx || STM32L471xx || STM32L475xx
31-
# STM32L476xx || STM32L485xx || STM32L486xx
32-
# STM32L496xx || STM32L4A6xx || STM32L4R5xx
33-
# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx
34-
# STM32L4S7xx || STM32L4S9xx
35-
# You can select chips from the list above
3614
CPPDEFINES = ['STM32L432xx']
15+
3716
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
3817

3918
Return('group')

bsp/stm32/stm32l433-ali-startkit/SConstruct

+2-8
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44-
SDK_LIB = libraries_path_prefix
45-
Export('SDK_LIB')
46-
4744
# prepare building environment
4845
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
4946

50-
stm32_library = 'STM32L4xx_HAL'
51-
rtconfig.BSP_LIBRARY_TYPE = stm32_library
47+
rtconfig.BSP_LIBRARY_TYPE = None
5248

53-
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0))
5549
# include drivers
56-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0))
50+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0))
5751

5852
# make a building
5953
DoBuilding(TARGET, objs)
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import os
2-
import rtconfig
31
from building import *
42

5-
Import('SDK_LIB')
6-
73
cwd = GetCurrentDir()
84

95
# add general drivers
@@ -15,16 +11,8 @@ CubeMX_Config/Core/Src/stm32l4xx_hal_msp.c
1511
path = [cwd]
1612
path += [cwd + '/CubeMX_Config/Core/Inc']
1713

18-
startup_path_prefix = SDK_LIB
19-
20-
if rtconfig.PLATFORM in ['gcc']:
21-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l433xx.s']
22-
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
23-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l433xx.s']
24-
elif rtconfig.PLATFORM in ['iccarm']:
25-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l433xx.s']
26-
2714
CPPDEFINES = ['STM32L433xx']
15+
2816
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
2917

3018
Return('group')

bsp/stm32/stm32l433-st-nucleo/SConstruct

+2-8
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44-
SDK_LIB = libraries_path_prefix
45-
Export('SDK_LIB')
46-
4744
# prepare building environment
4845
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
4946

50-
stm32_library = 'STM32L4xx_HAL'
51-
rtconfig.BSP_LIBRARY_TYPE = stm32_library
47+
rtconfig.BSP_LIBRARY_TYPE = None
5248

53-
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0))
5549
# include drivers
56-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0))
50+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0))
5751

5852
# make a building
5953
DoBuilding(TARGET, objs)
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
import os
2-
import rtconfig
31
from building import *
42

5-
Import('SDK_LIB')
6-
73
cwd = GetCurrentDir()
84

95
# add general drivers
@@ -15,25 +11,8 @@ CubeMX_Config/Src/stm32l4xx_hal_msp.c
1511
path = [cwd]
1612
path += [cwd + '/CubeMX_Config/Inc']
1713

18-
startup_path_prefix = SDK_LIB
19-
20-
if rtconfig.PLATFORM in ['gcc']:
21-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l433xx.s']
22-
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
23-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l433xx.s']
24-
elif rtconfig.PLATFORM in ['iccarm']:
25-
src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l433xx.s']
26-
27-
# STM32L412xx || STM32L422xx || STM32L431xx
28-
# STM32L432xx || STM32L433xx || STM32L442xx
29-
# STM32L443xx || STM32L451xx || STM32L452xx
30-
# STM32L462xx || STM32L471xx || STM32L475xx
31-
# STM32L476xx || STM32L485xx || STM32L486xx
32-
# STM32L496xx || STM32L4A6xx || STM32L4R5xx
33-
# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx
34-
# STM32L4S7xx || STM32L4S9xx
35-
# You can select chips from the list above
3614
CPPDEFINES = ['STM32L433xx']
15+
3716
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
3817

3918
Return('group')

bsp/stm32/stm32l452-st-nucleo/SConstruct

+2-8
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,13 @@ if os.path.exists(SDK_ROOT + '/libraries'):
4141
else:
4242
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
4343

44-
SDK_LIB = libraries_path_prefix
45-
Export('SDK_LIB')
46-
4744
# prepare building environment
4845
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
4946

50-
stm32_library = 'STM32L4xx_HAL'
51-
rtconfig.BSP_LIBRARY_TYPE = stm32_library
47+
rtconfig.BSP_LIBRARY_TYPE = None
5248

53-
# include libraries
54-
objs.extend(SConscript(os.path.join(libraries_path_prefix, stm32_library, 'SConscript'), variant_dir='build/libraries/'+stm32_library, duplicate=0))
5549
# include drivers
56-
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'),variant_dir='build/libraries/'+'HAL_Drivers', duplicate=0))
50+
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript'), variant_dir='build/libraries/HAL_Drivers', duplicate=0))
5751

5852
# make a building
5953
DoBuilding(TARGET, objs)

0 commit comments

Comments
 (0)