Merge pull request #1454 from uestczyh222/master
[BSP][imxRT1052]fix scons build with iar armcc
This commit is contained in:
commit
64ad95253b
@ -12,7 +12,7 @@ if os.getenv('RTT_CC'):
|
|||||||
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
|
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
|
||||||
if CROSS_TOOL == 'gcc':
|
if CROSS_TOOL == 'gcc':
|
||||||
PLATFORM = 'gcc'
|
PLATFORM = 'gcc'
|
||||||
EXEC_PATH = r'D:\Program Files (x86)\GNU Tools ARM Embedded\5.4 2016q3\bin'
|
EXEC_PATH = '/usr/local/Cellar/arm-none-eabi-gcc/7-2017-q4-major/gcc/bin/'
|
||||||
elif CROSS_TOOL == 'keil':
|
elif CROSS_TOOL == 'keil':
|
||||||
PLATFORM = 'armcc'
|
PLATFORM = 'armcc'
|
||||||
EXEC_PATH = 'C:/Keil_v5'
|
EXEC_PATH = 'C:/Keil_v5'
|
||||||
@ -40,8 +40,8 @@ if PLATFORM == 'gcc':
|
|||||||
OBJCPY = PREFIX + 'objcopy'
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
STRIP = PREFIX + 'strip'
|
STRIP = PREFIX + 'strip'
|
||||||
|
|
||||||
DEVICE = ' -mcpu=cortex-m7 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -ffunction-sections -fdata-sections'
|
DEVICE = ' -mcpu=cortex-m7 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
|
||||||
CFLAGS = DEVICE + ' -std=c99 -Wall -DUSE_HAL_DRIVER -D__ASSEMBLY__ -D__FPU_PRESENT -eentry'
|
CFLAGS = DEVICE + ' -std=c99 -Wall -D__FPU_PRESENT -eentry'
|
||||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
|
||||||
LFLAGS = DEVICE + ' -lm -lgcc -lc' + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread-imxrt-gcc.map,-cref,-u,Reset_Handler -T ./Libraries/gcc/MIMXRT1052xxxxx_flexspi_nor.ld'
|
LFLAGS = DEVICE + ' -lm -lgcc -lc' + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread-imxrt-gcc.map,-cref,-u,Reset_Handler -T ./Libraries/gcc/MIMXRT1052xxxxx_flexspi_nor.ld'
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ elif PLATFORM == 'armcc':
|
|||||||
DEVICE = ' --cpu Cortex-M7.fp.sp'
|
DEVICE = ' --cpu Cortex-M7.fp.sp'
|
||||||
CFLAGS = DEVICE + ' --apcs=interwork'
|
CFLAGS = DEVICE + ' --apcs=interwork'
|
||||||
AFLAGS = DEVICE
|
AFLAGS = DEVICE
|
||||||
LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-imxrt-mdk.map --scatter ./Libraries/arm/MIMXRT1052xxxxx_flexspi_nor.scf'
|
LFLAGS = DEVICE + ' --libpath "' + EXEC_PATH + '\ARM\ARMCC\lib" --info sizes --info totals --info unused --info veneers --list rtthread-imxrt-mdk.map --scatter ./Libraries/arm/MIMXRT1052xxxxx_flexspi_nor.scf'
|
||||||
|
|
||||||
CFLAGS += ' --diag_suppress=66,1296,186'
|
CFLAGS += ' --diag_suppress=66,1296,186'
|
||||||
CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC'
|
CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC'
|
||||||
@ -100,12 +100,13 @@ elif PLATFORM == 'armcc':
|
|||||||
elif PLATFORM == 'iar':
|
elif PLATFORM == 'iar':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'iccarm'
|
CC = 'iccarm'
|
||||||
|
CXX = 'iccarm'
|
||||||
AS = 'iasmarm'
|
AS = 'iasmarm'
|
||||||
AR = 'iarchive'
|
AR = 'iarchive'
|
||||||
LINK = 'ilinkarm'
|
LINK = 'ilinkarm'
|
||||||
TARGET_EXT = 'out'
|
TARGET_EXT = 'out'
|
||||||
|
|
||||||
DEVICE = ' -D USE_STDPERIPH_DRIVER'
|
DEVICE = ' -D__FPU_PRESENT'
|
||||||
|
|
||||||
CFLAGS = DEVICE
|
CFLAGS = DEVICE
|
||||||
CFLAGS += ' --diag_suppress Pa050'
|
CFLAGS += ' --diag_suppress Pa050'
|
||||||
@ -125,6 +126,8 @@ elif PLATFORM == 'iar':
|
|||||||
CFLAGS += ' -Ol'
|
CFLAGS += ' -Ol'
|
||||||
CFLAGS += ' --use_c++_inline'
|
CFLAGS += ' --use_c++_inline'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
AFLAGS = ''
|
AFLAGS = ''
|
||||||
AFLAGS += ' -s+'
|
AFLAGS += ' -s+'
|
||||||
AFLAGS += ' -w+'
|
AFLAGS += ' -w+'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user