[bsp] fix gcc build error

This commit is contained in:
tanek liang 2017-10-30 16:41:37 +08:00
parent 60e3e57905
commit 96b081fb4a
3 changed files with 6 additions and 13 deletions

View File

@ -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)

View File

@ -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
}

View File

@ -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'