From 96b081fb4a98b2eb0aff748811a6b4656a1c9a32 Mon Sep 17 00:00:00 2001 From: tanek liang Date: Mon, 30 Oct 2017 16:41:37 +0800 Subject: [PATCH] [bsp] fix gcc build error --- bsp/imxrt1052-evk/Libraries/SConscript | 11 ++--------- bsp/imxrt1052-evk/imxrt1052_sdram.ld | 6 +++--- bsp/imxrt1052-evk/rtconfig.py | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/bsp/imxrt1052-evk/Libraries/SConscript b/bsp/imxrt1052-evk/Libraries/SConscript index 414e9e5a09..a38d401eb3 100644 --- a/bsp/imxrt1052-evk/Libraries/SConscript +++ b/bsp/imxrt1052-evk/Libraries/SConscript @@ -10,23 +10,16 @@ SrcRemove(src, 'drivers/dataqueue.c') src += Glob('common/chip/*.c') src += [cwd + '/system_MIMXRT1052.c'] -CPPPATH = [ cwd, cwd + '/drivers', cwd + '/utilities', cwd + '/CMSIS/include'] +CPPPATH = [ cwd, cwd + '/drivers', cwd + '/utilities', cwd + '/CMSIS/Include'] CPPDEFINES = ['CPU_MIMXRT1052DVL6A', 'SKIP_SYSCLK_INIT', 'EVK_MCIMXRM', 'FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL=1'] -# CPPDEFINES = ['CPU_MIMXRT1052DVL6A', 'EVK_MCIMXRM'] # add for startup script if rtconfig.CROSS_TOOL == 'gcc': - src += [cwd + '/gcc/startup_MIMXRT1052.s'] + src += [cwd + '/gcc/startup_MIMXRT1052.S'] elif rtconfig.CROSS_TOOL == 'keil': src += [cwd + '/arm/startup_MIMXRT1052.s'] elif rtconfig.CROSS_TOOL == 'iar': src += [cwd + '/iar/startup_MIMXRT1052.s'] - -# if GetDepend('RT_USING_IMX_MID_SDMMC'): - # src += Glob('middleware/sdmmc/src/*.c') - # CPPPATH += [cwd + '/middleware/sdmmc/inc'] - # CPPPATH += [cwd + '/middleware/sdmmc/port'] - # CPPPATH += [cwd + '/middleware/sdmmc/port/usdhc/polling'] group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES) diff --git a/bsp/imxrt1052-evk/imxrt1052_sdram.ld b/bsp/imxrt1052-evk/imxrt1052_sdram.ld index 5d6dc0bf14..38a7849664 100644 --- a/bsp/imxrt1052-evk/imxrt1052_sdram.ld +++ b/bsp/imxrt1052-evk/imxrt1052_sdram.ld @@ -53,9 +53,9 @@ STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400; /* Specify the memory areas */ MEMORY { - m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400 - m_text (RX) : ORIGIN = 0x00000400, LENGTH = 0x0001FC00 - m_data (RW) : ORIGIN = 0x80000000, LENGTH = 0x01E00000 + m_interrupts (RX) : ORIGIN = 0x80000000, LENGTH = 0x80000400 + m_text (RX) : ORIGIN = 0x80000400, LENGTH = 0x8007FC00 + m_data (RW) : ORIGIN = 0x80000000, LENGTH = 0x01600000 m_ncache (RW) : ORIGIN = 0x81E00000, LENGTH = 0x00200000 } diff --git a/bsp/imxrt1052-evk/rtconfig.py b/bsp/imxrt1052-evk/rtconfig.py index 8e81fc25bb..720ae5aae1 100644 --- a/bsp/imxrt1052-evk/rtconfig.py +++ b/bsp/imxrt1052-evk/rtconfig.py @@ -40,7 +40,7 @@ if PLATFORM == 'gcc': OBJCPY = PREFIX + 'objcopy' STRIP = PREFIX + 'strip' - DEVICE = ' -mcpu=cortex-m7 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -ffunction-sections -fdata-sections' + DEVICE = ' -std=c99 -mcpu=cortex-m7 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -ffunction-sections -fdata-sections' CFLAGS = DEVICE + ' -g -Wall -DUSE_HAL_DRIVER -D__ASSEMBLY__ -D__FPU_USED -eentry' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb ' LFLAGS = DEVICE + ' -lm -lgcc -lc' + ' -nostartfiles -Wl,--gc-sections,-Map=imxrt1052_sdram.map,-cref,-u,Reset_Handler -T imxrt1052_sdram.ld'