From a87ae1abee5e7e512fa240f83a6a9b40cd140217 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Thu, 29 May 2014 12:30:39 +0800 Subject: [PATCH 1/3] ls1b: add rt_init section --- bsp/ls1bdev/ls1b_ram.lds | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bsp/ls1bdev/ls1b_ram.lds b/bsp/ls1bdev/ls1b_ram.lds index e55c6458654..28a6cef0065 100644 --- a/bsp/ls1bdev/ls1b_ram.lds +++ b/bsp/ls1bdev/ls1b_ram.lds @@ -46,6 +46,12 @@ SECTIONS KEEP(*(VSymTab)) __vsymtab_end = .; . = ALIGN(4); + + . = ALIGN(4); + __rt_init_start = .; + KEEP(*(SORT(.rti_fn*))) + __rt_init_end = .; + . = ALIGN(4); } . = ALIGN(4); From 6f53402e035ec75fa97ec75f4a00b29c7543e71f Mon Sep 17 00:00:00 2001 From: Grissiom Date: Thu, 29 May 2014 12:32:46 +0800 Subject: [PATCH 2/3] ls1b: add nostartfiles to LFLAGS We don't need the crt0 from the toolchain. --- bsp/ls1bdev/rtconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/ls1bdev/rtconfig.py b/bsp/ls1bdev/rtconfig.py index 1f189e95632..af4c27878ce 100644 --- a/bsp/ls1bdev/rtconfig.py +++ b/bsp/ls1bdev/rtconfig.py @@ -43,7 +43,7 @@ DEVICE = ' -mips32' CFLAGS = DEVICE + ' -EL -G0 -mno-abicalls -fno-pic -fno-builtin -fno-exceptions -ffunction-sections -fomit-frame-pointer' AFLAGS = ' -c' + DEVICE + ' -EL -fno-pic -fno-builtin -mno-abicalls -x assembler-with-cpp -DSYSTEM_STACK=0x80003fe8' -LFLAGS = DEVICE + ' -EL -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T ls1b_ram.lds' +LFLAGS = DEVICE + ' -nostartfiles -EL -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T ls1b_ram.lds' CPATH = '' LPATH = '' From 2c5cfe4bcf6de5e13a06ec2cbcf4233e1f4cfa28 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Thu, 29 May 2014 12:35:17 +0800 Subject: [PATCH 3/3] ls1b: cleanup code --- bsp/ls1bdev/applications/startup.c | 2 +- bsp/ls1bdev/rtconfig.py | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/bsp/ls1bdev/applications/startup.c b/bsp/ls1bdev/applications/startup.c index e73900485d4..36ec17e46c7 100644 --- a/bsp/ls1bdev/applications/startup.c +++ b/bsp/ls1bdev/applications/startup.c @@ -85,7 +85,7 @@ void rtthread_startup(void) rt_system_scheduler_start(); /* never reach here */ - return ; + return; } /*@}*/ diff --git a/bsp/ls1bdev/rtconfig.py b/bsp/ls1bdev/rtconfig.py index af4c27878ce..8373448a372 100644 --- a/bsp/ls1bdev/rtconfig.py +++ b/bsp/ls1bdev/rtconfig.py @@ -13,14 +13,9 @@ if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_MIPS_ELF/bin' -elif CROSS_TOOL == 'keil': - print '================ERROR============================' - print 'Not support keil yet!' - print '=================================================' - exit(0) -elif CROSS_TOOL == 'iar': +else: print '================ERROR============================' - print 'Not support iar yet!' + print 'Not support %s yet!' % CROSS_TOOL print '=================================================' exit(0)