From 4de2f13fcd06e366386089ef2871c4698c786a6e Mon Sep 17 00:00:00 2001 From: qiuyiuestc Date: Sat, 26 Dec 2009 14:47:27 +0000 Subject: support GCC compiler for LM3S platform git-svn-id: https://rt-thread.googlecode.com/svn/trunk@236 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/lm3s/board.h | 5 +++++ bsp/lm3s/startup.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'bsp') diff --git a/bsp/lm3s/board.h b/bsp/lm3s/board.h index 3c796846d4..9a2f330aa0 100644 --- a/bsp/lm3s/board.h +++ b/bsp/lm3s/board.h @@ -15,6 +15,11 @@ #ifndef __BOARD_H__ #define __BOARD_H__ +// Internal SRAM memory size[Kbytes] <8-64> +// Default: 64 +#define LM3S_SRAM_SIZE 64 +#define LM3S_SRAM_END (0x20000000 + LM3S_SRAM_SIZE * 1024) + void rt_hw_board_led_on(int n); void rt_hw_board_led_off(int n); void rt_hw_board_init(void); diff --git a/bsp/lm3s/startup.c b/bsp/lm3s/startup.c index cf2d45ac03..412b74c738 100644 --- a/bsp/lm3s/startup.c +++ b/bsp/lm3s/startup.c @@ -19,9 +19,9 @@ /** * @addtogroup LM3S - */ + */ -extern void rt_hw_serial_init(void); +extern void rt_hw_serial_init(void); /*@{*/ #ifdef RT_USING_FINSH @@ -82,12 +82,12 @@ void rtthread_startup(void) #ifdef RT_USING_HEAP #ifdef __CC_ARM - rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x20010000); + rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)LM3S_SRAM_END); #elif __ICCARM__ - rt_system_heap_init(__segment_end("HEAP"), (void*)0x20010000); + rt_system_heap_init(__segment_end("HEAP"), (void*)LM3S_SRAM_END); #else /* init memory system */ - rt_system_heap_init((void*)&__bss_end, (void*)0x20010000); + rt_system_heap_init((void*)&__bss_end, (void*)LM3S_SRAM_END); #endif #endif -- cgit v1.3.1