[BSP] Fix the gcc compiling issue in LPC408x bsp

This commit is contained in:
Bernard Xiong 2014-11-01 09:26:56 +08:00
parent 3bf721a6fb
commit 796c49347e
4 changed files with 31 additions and 23 deletions

View File

@ -130,8 +130,10 @@ CRP_Value:
.section .cs3.reset,"x",%progbits
.thumb_func
.globl __cs3_reset_cortex_m
.globl Reset_Handler
.type __cs3_reset_cortex_m, %function
__cs3_reset_cortex_m:
Reset_Handler:
.fnstart
.ifdef RAM_MODE
/* Clear .bss section (Zero init) */
@ -154,7 +156,7 @@ BSSIsEmpty:
.else
LDR R0, =SystemInit
BLX R0
LDR R0,=_start
LDR R0,=main
BX R0
.endif
.pool

View File

@ -15,6 +15,7 @@ TARGET = 'rtthread-%s.%s' % (rtconfig.BOARD_NAME, rtconfig.TARGET_EXT)
env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)

View File

@ -104,8 +104,8 @@
// </section>
// <section name="LIBC" description="C Runtime library setting" default="always" >
// <bool name="RT_USING_NEWLIB" description="Using newlib library, only available under GNU GCC" default="true" />
// #define RT_USING_NEWLIB
// <bool name="RT_USING_LIBC" description="Using C library" default="true" />
// #define RT_USING_LIBC
// <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
#define RT_USING_PTHREADS
// </section>

View File

@ -30,6 +30,7 @@ if PLATFORM == 'gcc':
# toolchains
PREFIX = 'arm-none-eabi-'
CC = PREFIX + 'gcc'
CXX = PREFIX + 'g++'
AS = PREFIX + 'gcc'
AR = PREFIX + 'ar'
LINK = PREFIX + 'gcc'
@ -52,11 +53,14 @@ if PLATFORM == 'gcc':
else:
CFLAGS += ' -O2'
CXXFLAGS = CFLAGS
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
elif PLATFORM == 'armcc':
# toolchains
CC = 'armcc'
CXX = 'armcc'
AS = 'armasm'
AR = 'armar'
LINK = 'armlink'
@ -70,6 +74,7 @@ elif PLATFORM == 'armcc':
CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC'
LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/RV31/LIB'
CXXFLAGS = CFLAGS
EXEC_PATH += '/arm/bin40/'