mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-23 17:48:27 +08:00
[bsp][stm32l4] remove local HAL
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user