mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-30 22:10:28 +08:00
[BSP] Fix the gcc compiling issue in LPC408x bsp
This commit is contained in:
parent
3bf721a6fb
commit
796c49347e
@ -102,18 +102,18 @@ __cs3_interrupt_vector_cortex_m:
|
|||||||
.long DMA_IRQHandler /* 42: General Purpose DMA */
|
.long DMA_IRQHandler /* 42: General Purpose DMA */
|
||||||
.long I2S_IRQHandler /* 43: I2S */
|
.long I2S_IRQHandler /* 43: I2S */
|
||||||
.long ENET_IRQHandler /* 44: Ethernet */
|
.long ENET_IRQHandler /* 44: Ethernet */
|
||||||
.long MCI_IRQHandler /* 45: SD/MMC Card */
|
.long MCI_IRQHandler /* 45: SD/MMC Card */
|
||||||
.long MCPWM_IRQHandler /* 46: Motor Control PWM */
|
.long MCPWM_IRQHandler /* 46: Motor Control PWM */
|
||||||
.long QEI_IRQHandler /* 47: Quadrature Encoder Interface */
|
.long QEI_IRQHandler /* 47: Quadrature Encoder Interface */
|
||||||
.long PLL1_IRQHandler /* 48: PLL1 Lock (USB PLL) */
|
.long PLL1_IRQHandler /* 48: PLL1 Lock (USB PLL) */
|
||||||
.long USBActivity_IRQHandler /* 49: USB Activity */
|
.long USBActivity_IRQHandler /* 49: USB Activity */
|
||||||
.long CANActivity_IRQHandler /* 50: CAN Activity */
|
.long CANActivity_IRQHandler /* 50: CAN Activity */
|
||||||
.long UART4_IRQHandler /* 51: UART4 */
|
.long UART4_IRQHandler /* 51: UART4 */
|
||||||
.long SSP2_IRQHandler /* 52: SSP2 */
|
.long SSP2_IRQHandler /* 52: SSP2 */
|
||||||
.long LCD_IRQHandler /* 53: LCD */
|
.long LCD_IRQHandler /* 53: LCD */
|
||||||
.long GPIO_IRQHandler /* 54: GPIO */
|
.long GPIO_IRQHandler /* 54: GPIO */
|
||||||
.long PWM0_IRQHandler /* 55: PWM0 */
|
.long PWM0_IRQHandler /* 55: PWM0 */
|
||||||
.long EEPROM_IRQHandler /* 56: EEPROM */
|
.long EEPROM_IRQHandler /* 56: EEPROM */
|
||||||
|
|
||||||
.size __cs3_interrupt_vector_cortex_m, . - __cs3_interrupt_vector_cortex_m
|
.size __cs3_interrupt_vector_cortex_m, . - __cs3_interrupt_vector_cortex_m
|
||||||
|
|
||||||
@ -130,22 +130,24 @@ CRP_Value:
|
|||||||
.section .cs3.reset,"x",%progbits
|
.section .cs3.reset,"x",%progbits
|
||||||
.thumb_func
|
.thumb_func
|
||||||
.globl __cs3_reset_cortex_m
|
.globl __cs3_reset_cortex_m
|
||||||
|
.globl Reset_Handler
|
||||||
.type __cs3_reset_cortex_m, %function
|
.type __cs3_reset_cortex_m, %function
|
||||||
__cs3_reset_cortex_m:
|
__cs3_reset_cortex_m:
|
||||||
|
Reset_Handler:
|
||||||
.fnstart
|
.fnstart
|
||||||
.ifdef RAM_MODE
|
.ifdef RAM_MODE
|
||||||
/* Clear .bss section (Zero init) */
|
/* Clear .bss section (Zero init) */
|
||||||
MOV R0, #0
|
MOV R0, #0
|
||||||
LDR R1, =__bss_start__
|
LDR R1, =__bss_start__
|
||||||
LDR R2, =__bss_end__
|
LDR R2, =__bss_end__
|
||||||
CMP R1,R2
|
CMP R1,R2
|
||||||
BEQ BSSIsEmpty
|
BEQ BSSIsEmpty
|
||||||
LoopZI:
|
LoopZI:
|
||||||
CMP R1, R2
|
CMP R1, R2
|
||||||
BHS BSSIsEmpty
|
BHS BSSIsEmpty
|
||||||
STR R0, [R1]
|
STR R0, [R1]
|
||||||
ADD R1, #4
|
ADD R1, #4
|
||||||
BLO LoopZI
|
BLO LoopZI
|
||||||
BSSIsEmpty:
|
BSSIsEmpty:
|
||||||
LDR R0, =SystemInit
|
LDR R0, =SystemInit
|
||||||
BLX R0
|
BLX R0
|
||||||
@ -154,7 +156,7 @@ BSSIsEmpty:
|
|||||||
.else
|
.else
|
||||||
LDR R0, =SystemInit
|
LDR R0, =SystemInit
|
||||||
BLX R0
|
BLX R0
|
||||||
LDR R0,=_start
|
LDR R0,=main
|
||||||
BX R0
|
BX R0
|
||||||
.endif
|
.endif
|
||||||
.pool
|
.pool
|
||||||
|
@ -15,6 +15,7 @@ TARGET = 'rtthread-%s.%s' % (rtconfig.BOARD_NAME, rtconfig.TARGET_EXT)
|
|||||||
env = Environment(tools = ['mingw'],
|
env = Environment(tools = ['mingw'],
|
||||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||||
|
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
|
||||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
@ -104,8 +104,8 @@
|
|||||||
// </section>
|
// </section>
|
||||||
|
|
||||||
// <section name="LIBC" description="C Runtime library setting" default="always" >
|
// <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" />
|
// <bool name="RT_USING_LIBC" description="Using C library" default="true" />
|
||||||
// #define RT_USING_NEWLIB
|
// #define RT_USING_LIBC
|
||||||
// <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
|
// <bool name="RT_USING_PTHREADS" description="Using POSIX threads library" default="true" />
|
||||||
#define RT_USING_PTHREADS
|
#define RT_USING_PTHREADS
|
||||||
// </section>
|
// </section>
|
||||||
|
@ -29,7 +29,8 @@ BUILD = 'debug'
|
|||||||
if PLATFORM == 'gcc':
|
if PLATFORM == 'gcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
PREFIX = 'arm-none-eabi-'
|
PREFIX = 'arm-none-eabi-'
|
||||||
CC = PREFIX + 'gcc'
|
CC = PREFIX + 'gcc'
|
||||||
|
CXX = PREFIX + 'g++'
|
||||||
AS = PREFIX + 'gcc'
|
AS = PREFIX + 'gcc'
|
||||||
AR = PREFIX + 'ar'
|
AR = PREFIX + 'ar'
|
||||||
LINK = PREFIX + 'gcc'
|
LINK = PREFIX + 'gcc'
|
||||||
@ -52,11 +53,14 @@ if PLATFORM == 'gcc':
|
|||||||
else:
|
else:
|
||||||
CFLAGS += ' -O2'
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||||
|
|
||||||
elif PLATFORM == 'armcc':
|
elif PLATFORM == 'armcc':
|
||||||
# toolchains
|
# toolchains
|
||||||
CC = 'armcc'
|
CC = 'armcc'
|
||||||
|
CXX = 'armcc'
|
||||||
AS = 'armasm'
|
AS = 'armasm'
|
||||||
AR = 'armar'
|
AR = 'armar'
|
||||||
LINK = 'armlink'
|
LINK = 'armlink'
|
||||||
@ -70,6 +74,7 @@ elif PLATFORM == 'armcc':
|
|||||||
|
|
||||||
CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC'
|
CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC'
|
||||||
LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/RV31/LIB'
|
LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/RV31/LIB'
|
||||||
|
CXXFLAGS = CFLAGS
|
||||||
|
|
||||||
EXEC_PATH += '/arm/bin40/'
|
EXEC_PATH += '/arm/bin40/'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user