[synwit] add variant_dir for libraries building
This commit is contained in:
parent
0ad5c9585d
commit
22b9de6f1d
|
@ -40,10 +40,10 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
||||||
libraries_path = os.path.join(GetCurrentDir(), '..', 'libraries')
|
libraries_path = os.path.join(GetCurrentDir(), '..', 'libraries')
|
||||||
|
|
||||||
# include libraries
|
# include libraries
|
||||||
objs += SConscript(os.path.join(libraries_path, 'SWM320_CSL', 'SConscript'))
|
objs += SConscript(os.path.join(libraries_path, 'SWM320_CSL', 'SConscript'), variant_dir='build/libraries/SWM320_CSL', duplicate=0)
|
||||||
|
|
||||||
# include drivers
|
# include drivers
|
||||||
objs += SConscript(os.path.join(libraries_path, 'SWM320_drivers', 'SConscript'))
|
objs += SConscript(os.path.join(libraries_path, 'SWM320_drivers', 'SConscript'), variant_dir='build/libraries/SWM320_drivers', duplicate=0)
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
DoBuilding(TARGET, objs)
|
DoBuilding(TARGET, objs)
|
||||||
|
|
|
@ -39,8 +39,9 @@ if PLATFORM == 'gcc':
|
||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
TARGET_EXT = 'elf'
|
TARGET_EXT = 'elf'
|
||||||
DEVICE = ' -mcpu=' + CPU + ' -mthumb -ffunction-sections -fdata-sections'
|
|
||||||
CFLAGS = DEVICE + ' -g -Wall'
|
DEVICE = ' -mcpu=cortex-m4 -mthumb -ffunction-sections -fdata-sections'
|
||||||
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
|
|
|
@ -40,10 +40,10 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
||||||
libraries_path = os.path.join(GetCurrentDir(), '..', 'libraries')
|
libraries_path = os.path.join(GetCurrentDir(), '..', 'libraries')
|
||||||
|
|
||||||
# include libraries
|
# include libraries
|
||||||
objs += SConscript(os.path.join(libraries_path, 'SWM341_CSL', 'SConscript'))
|
objs += SConscript(os.path.join(libraries_path, 'SWM341_CSL', 'SConscript'), variant_dir='build/libraries/SWM341_CSL', duplicate=0)
|
||||||
|
|
||||||
# include drivers
|
# include drivers
|
||||||
objs += SConscript(os.path.join(libraries_path, 'SWM341_drivers', 'SConscript'))
|
objs += SConscript(os.path.join(libraries_path, 'SWM341_drivers', 'SConscript'), variant_dir='build/libraries/SWM341_drivers', duplicate=0)
|
||||||
|
|
||||||
|
|
||||||
# make a building
|
# make a building
|
||||||
|
|
|
@ -3,7 +3,7 @@ import os
|
||||||
# toolchains options
|
# toolchains options
|
||||||
ARCH='arm'
|
ARCH='arm'
|
||||||
CPU='cortex-m33'
|
CPU='cortex-m33'
|
||||||
CROSS_TOOL='keil'
|
CROSS_TOOL='gcc'
|
||||||
|
|
||||||
if os.getenv('RTT_CC'):
|
if os.getenv('RTT_CC'):
|
||||||
CROSS_TOOL = os.getenv('RTT_CC')
|
CROSS_TOOL = os.getenv('RTT_CC')
|
||||||
|
@ -29,20 +29,20 @@ BUILD = 'debug'
|
||||||
#BUILD = 'release'
|
#BUILD = 'release'
|
||||||
|
|
||||||
if PLATFORM == 'gcc':
|
if PLATFORM == 'gcc':
|
||||||
# toolchains
|
|
||||||
PREFIX = 'arm-none-eabi-'
|
PREFIX = 'arm-none-eabi-'
|
||||||
CC = PREFIX + 'gcc'
|
CC = PREFIX + 'gcc'
|
||||||
AS = PREFIX + 'gcc'
|
AS = PREFIX + 'gcc'
|
||||||
AR = PREFIX + 'ar'
|
AR = PREFIX + 'ar'
|
||||||
CXX = PREFIX + 'g++'
|
CXX = PREFIX + 'g++'
|
||||||
LINK = PREFIX + 'gcc'
|
LINK = PREFIX + 'gcc'
|
||||||
TARGET_EXT = 'elf'
|
|
||||||
SIZE = PREFIX + 'size'
|
SIZE = PREFIX + 'size'
|
||||||
OBJDUMP = PREFIX + 'objdump'
|
OBJDUMP = PREFIX + 'objdump'
|
||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=' + CPU + ' -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
TARGET_EXT = 'elf'
|
||||||
CFLAGS = DEVICE + ' -Dgcc -fstack-usage -fdump-rtl-dfinish'
|
|
||||||
|
DEVICE = ' -mcpu=cortex-m33 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
|
CFLAGS = DEVICE + ' -Dgcc'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb -I.'
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb -I.'
|
||||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue