From 017d2b766270fd88786a6b8d3dc736bca5e27878 Mon Sep 17 00:00:00 2001 From: qiuyiuestc Date: Sat, 26 Dec 2009 12:40:15 +0000 Subject: support GCC compiler for LM3S platform git-svn-id: https://rt-thread.googlecode.com/svn/trunk@235 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/lm3s/lm3s_rom.sct | 15 +++++++++++++++ bsp/lm3s/rtconfig.py | 24 ++---------------------- 2 files changed, 17 insertions(+), 22 deletions(-) create mode 100644 bsp/lm3s/lm3s_rom.sct (limited to 'bsp') diff --git a/bsp/lm3s/lm3s_rom.sct b/bsp/lm3s/lm3s_rom.sct new file mode 100644 index 0000000000..79a39c72e8 --- /dev/null +++ b/bsp/lm3s/lm3s_rom.sct @@ -0,0 +1,15 @@ +; ************************************************************* +; *** Scatter-Loading Description File generated by uVision *** +; ************************************************************* + +LR_IROM1 0x00000000 0x00040000 { ; load region size_region + ER_IROM1 0x00000000 0x00040000 { ; load address = execution address + *.o (RESET, +First) + *(InRoot$$Sections) + .ANY (+RO) + } + RW_IRAM1 0x20000000 0x00010000 { ; RW data + .ANY (+RW +ZI) + } +} + diff --git a/bsp/lm3s/rtconfig.py b/bsp/lm3s/rtconfig.py index 190566216e..334745dace 100644 --- a/bsp/lm3s/rtconfig.py +++ b/bsp/lm3s/rtconfig.py @@ -21,8 +21,6 @@ CPU='lm3s' #EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin' PLATFORM = 'armcc' EXEC_PATH = 'E:/Keil' -#PLATFORM = 'iar' -#EXEC_PATH = 'E:/Program Files/IAR Systems/Embedded Workbench 5.4/' BUILD = 'debug' if PLATFORM == 'gcc': @@ -40,7 +38,7 @@ if PLATFORM == 'gcc': DEVICE = ' -mcpu=cortex-m3 -mthumb' CFLAGS = DEVICE + ' -Dsourcerygxx' + ' -DRT_USING_MINILIBC' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' - LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-lm3s.map,-cref,-u,ResetISR -T lm3s_rom.ld' + LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-lm3s.map,-cref,-u,Reset_Handler -T lm3s_rom.ld' CPATH = '' LPATH = '' @@ -65,7 +63,7 @@ elif PLATFORM == 'armcc': DEVICE = ' --device DARMSTM' CFLAGS = DEVICE + ' --apcs=interwork' AFLAGS = DEVICE - LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-stm32.map --scatter stm32_rom.sct' + LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-lm3s.map --scatter lm3s_rom.sct' CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC' LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/RV31/LIB' @@ -82,21 +80,3 @@ elif PLATFORM == 'armcc': if RT_USING_FINSH: LFLAGS += ' --keep __fsym_* --keep __vsym_*' POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET' - -elif PLATFORM == 'iar': - # toolchains - CC = 'iccarm' - AS = 'iasmarm' - AR = 'iarchive' - LINK = 'ilinkarm' - TARGET_EXT = 'out' - - DEVICE = ' --cpu DARMSTM --thumb' - - CFLAGS = '' - AFLAGS = '' - LFLAGS = ' --config stm32f10x_flash.icf' - - EXEC_PATH += '/arm/bin/' - RT_USING_MINILIBC = False - POST_ACTION = '' -- cgit v1.3.1