提交 696d7f6f 编写于 作者: wuyangyong's avatar wuyangyong

fixed scons + gcc compiling error for lm4f232.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1871 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 b498aa0d
...@@ -12,7 +12,7 @@ if rtconfig.PART_TYPE.startswith('PART_LM4F') != True: ...@@ -12,7 +12,7 @@ if rtconfig.PART_TYPE.startswith('PART_LM4F') != True:
# add for startup script # add for startup script
if rtconfig.CROSS_TOOL == 'gcc': if rtconfig.CROSS_TOOL == 'gcc':
src += ['startup/gcc/start_gcc.s'] src += ['startup/gcc/start_gcc.c']
elif rtconfig.CROSS_TOOL == 'keil': elif rtconfig.CROSS_TOOL == 'keil':
src += ['startup/arm/start_rvds.S'] src += ['startup/arm/start_rvds.S']
elif rtconfig.CROSS_TOOL == 'iar': elif rtconfig.CROSS_TOOL == 'iar':
...@@ -21,6 +21,9 @@ elif rtconfig.CROSS_TOOL == 'iar': ...@@ -21,6 +21,9 @@ elif rtconfig.CROSS_TOOL == 'iar':
CPPPATH = [cwd] CPPPATH = [cwd]
CPPDEFINES = [rtconfig.PART_TYPE] CPPDEFINES = [rtconfig.PART_TYPE]
if rtconfig.CROSS_TOOL == 'gcc':
CPPDEFINES += ['gcc'];
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES) group = DefineGroup('Libraries', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
Return('group') Return('group')
...@@ -32,6 +32,11 @@ static void NmiSR(void); ...@@ -32,6 +32,11 @@ static void NmiSR(void);
static void FaultISR(void); static void FaultISR(void);
static void IntDefaultHandler(void); static void IntDefaultHandler(void);
/* RT-Thread interface */
static void HardFault_Handler(void);
static void PendSV_Handler(void);
static void rt_hw_timer_handler(void);
//***************************************************************************** //*****************************************************************************
// //
// The entry point for the application. // The entry point for the application.
...@@ -59,7 +64,7 @@ void (* const g_pfnVectors[])(void) = ...@@ -59,7 +64,7 @@ void (* const g_pfnVectors[])(void) =
// The initial stack pointer // The initial stack pointer
ResetISR, // The reset handler ResetISR, // The reset handler
NmiSR, // The NMI handler NmiSR, // The NMI handler
FaultISR, // The hard fault handler HardFault_Handler, // The hard fault handler
IntDefaultHandler, // The MPU fault handler IntDefaultHandler, // The MPU fault handler
IntDefaultHandler, // The bus fault handler IntDefaultHandler, // The bus fault handler
IntDefaultHandler, // The usage fault handler IntDefaultHandler, // The usage fault handler
...@@ -70,8 +75,8 @@ void (* const g_pfnVectors[])(void) = ...@@ -70,8 +75,8 @@ void (* const g_pfnVectors[])(void) =
IntDefaultHandler, // SVCall handler IntDefaultHandler, // SVCall handler
IntDefaultHandler, // Debug monitor handler IntDefaultHandler, // Debug monitor handler
0, // Reserved 0, // Reserved
IntDefaultHandler, // The PendSV handler PendSV_Handler, // The PendSV handler
IntDefaultHandler, // The SysTick handler rt_hw_timer_handler, // The SysTick handler
IntDefaultHandler, // GPIO Port A IntDefaultHandler, // GPIO Port A
IntDefaultHandler, // GPIO Port B IntDefaultHandler, // GPIO Port B
IntDefaultHandler, // GPIO Port C IntDefaultHandler, // GPIO Port C
......
/******************************************************************************
*
* lm4f_rom.ld - Linker configuration file for project.
*
* Copyright (c) 2011 Texas Instruments Incorporated. All rights reserved.
* Software License Agreement
*
* Texas Instruments (TI) is supplying this software for use solely and
* exclusively on TI's microcontroller products. The software is owned by
* TI and/or its suppliers, and is protected under applicable copyright
* laws. You may not combine this software with "viral" open-source
* software in order to form a larger program.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
* NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
* NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
* CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
* DAMAGES, FOR ANY REASON WHATSOEVER.
*
* This is part of revision 8264 of the EK-LM4F232 Firmware Package.
*
*****************************************************************************/
/* Program Entry, set to mark it as "used" and avoid gc */
MEMORY
{
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00040000
SRAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00008000
}
SECTIONS
{
.text :
{
_text = .;
KEEP(*(.isr_vector))
*(.text*)
*(.rodata*)
_etext = .;
/* section information for finsh shell */
. = ALIGN(4);
__fsymtab_start = .;
KEEP(*(FSymTab))
__fsymtab_end = .;
. = ALIGN(4);
__vsymtab_start = .;
KEEP(*(VSymTab))
__vsymtab_end = .;
. = ALIGN(4);
} > FLASH
.data : AT(ADDR(.text) + SIZEOF(.text))
{
_data = .;
*(vtable)
*(.data*)
_edata = .;
} > SRAM
.bss :
{
_bss = .;
*(.bss*)
*(COMMON)
_ebss = .;
} > SRAM
__bss_end = .;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册