fixed bsp/frdm-k64f gcc compile

This commit is contained in:
geniusgogo 2014-07-03 22:08:29 +08:00
parent 857ac7e6e6
commit 1546274d89
4 changed files with 26 additions and 11 deletions

View File

@ -77,6 +77,19 @@ SECTIONS
*(.dtors)
*(.rodata*)
/* section information for finsh shell */
. = ALIGN(4);
__fsymtab_start = .;
KEEP(*(FSymTab))
__fsymtab_end = .;
. = ALIGN(4);
__vsymtab_start = .;
KEEP(*(VSymTab))
__vsymtab_end = .;
. = ALIGN(4);
. = ALIGN(4);
_etext = .;
KEEP(*(.eh_frame*))
} > FLASH
@ -127,7 +140,7 @@ SECTIONS
__data_end__ = .;
} > RAM
__bss_start = .;
.bss :
{
__bss_start__ = .;
@ -135,7 +148,7 @@ SECTIONS
*(COMMON)
__bss_end__ = .;
} > RAM
__bss_end = .;
.heap :
{
__end__ = .;

View File

@ -5,18 +5,18 @@ from building import *
# get current directory
cwd = GetCurrentDir()
path = [cwd, cwd + '/MK64F12']
src = Glob('MK64F12/*.c')
#add for startup script
if rtconfig.CROSS_TOOL == 'gcc':
src = src + ['TOOLCHAIN_GCC_ARM/startup_MK64F12.S']
src = src + ['TOOLCHAIN_GCC_ARM/startup.c']
path += [cwd + 'TOOLCHAIN_GCC_ARM']
elif rtconfig.CROSS_TOOL == 'keil':
src = src + ['TOOLCHAIN_ARM_STD/startup_MK64F12.s']
# elif rtconfig.CROSS_TOOL == 'iar':
path = [cwd, cwd + '/MK64F12']
#CPPDEFINES = ['']
group = DefineGroup('Device', src, depend = [''], CPPPATH = path)
#CPPDEFINES = CPPDEFINES)

View File

@ -229,7 +229,9 @@ disable_watchdog:
ldr r0, =SystemInit
blx r0
ldr r0, =_start
ldr r0, =init_data_bss
blx r0
ldr r0, =main
bx r0
.pool
.size Reset_Handler, . - Reset_Handler

View File

@ -12,10 +12,10 @@ if os.getenv('RTT_CC'):
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc'
EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin'
EXEC_PATH = r'C:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin'
elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc'
EXEC_PATH = 'C:/Keil'
EXEC_PATH = r'C:/Keil'
elif CROSS_TOOL == 'iar':
print '================ERROR============================'
print 'Not support iar yet!'
@ -40,9 +40,9 @@ if PLATFORM == 'gcc':
OBJCPY = PREFIX + 'objcopy'
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
CFLAGS = DEVICE + ' -g -Wall '
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
LFLAGS = DEVICE + ' -lm -lgcc -lc' + ' -Wl,--gc-sections,-Map=rtthread-k64f.map,-cref,-u,Reset_Handler -T K64FN1M0xxx12.ld'
CFLAGS = DEVICE + ' -g -Wall -D__ASSEMBLY__ -D__FPU_USED'
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
LFLAGS = DEVICE + ' -lm -lgcc -lc' + ' -nostartfiles -Wl,--gc-sections,-Map=rtthread-k64f.map,-cref,-u,Reset_Handler -T K64FN1M0xxx12.ld'
CPATH = ''
LPATH = ''