|
@@ -30,7 +30,7 @@
|
|
// Forward declaration of the default fault handlers.
|
|
// Forward declaration of the default fault handlers.
|
|
//
|
|
//
|
|
//*****************************************************************************
|
|
//*****************************************************************************
|
|
-void ResetISR(void);
|
|
|
|
|
|
+void Reset_Handler(void);
|
|
static void NmiSR(void);
|
|
static void NmiSR(void);
|
|
static void FaultISR(void);
|
|
static void FaultISR(void);
|
|
static void IntDefaultHandler(void);
|
|
static void IntDefaultHandler(void);
|
|
@@ -70,9 +70,9 @@ void (* const g_pfnVectors[])(void) =
|
|
{
|
|
{
|
|
(void (*)(void))((unsigned long)pulStack + sizeof(pulStack)),
|
|
(void (*)(void))((unsigned long)pulStack + sizeof(pulStack)),
|
|
// The initial stack pointer
|
|
// The initial stack pointer
|
|
- ResetISR, // The reset handler
|
|
|
|
|
|
+ Reset_Handler, // The reset handler
|
|
NmiSR, // The NMI handler
|
|
NmiSR, // The NMI handler
|
|
- HardFault_Handler, // 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
|
|
@@ -233,10 +233,10 @@ void (* const g_pfnVectors[])(void) =
|
|
// for the "data" segment resides immediately following the "text" segment.
|
|
// for the "data" segment resides immediately following the "text" segment.
|
|
//
|
|
//
|
|
//*****************************************************************************
|
|
//*****************************************************************************
|
|
-extern unsigned long _etext;
|
|
|
|
-extern unsigned long _data;
|
|
|
|
|
|
+extern unsigned long _sidata;
|
|
|
|
+extern unsigned long _sdata;
|
|
extern unsigned long _edata;
|
|
extern unsigned long _edata;
|
|
-extern unsigned long _bss;
|
|
|
|
|
|
+extern unsigned long _sbss;
|
|
extern unsigned long _ebss;
|
|
extern unsigned long _ebss;
|
|
|
|
|
|
//*****************************************************************************
|
|
//*****************************************************************************
|
|
@@ -250,15 +250,15 @@ extern unsigned long _ebss;
|
|
//
|
|
//
|
|
//*****************************************************************************
|
|
//*****************************************************************************
|
|
void
|
|
void
|
|
-ResetISR(void)
|
|
|
|
|
|
+Reset_Handler(void)
|
|
{
|
|
{
|
|
unsigned long *pulSrc, *pulDest;
|
|
unsigned long *pulSrc, *pulDest;
|
|
|
|
|
|
//
|
|
//
|
|
// Copy the data segment initializers from flash to SRAM.
|
|
// Copy the data segment initializers from flash to SRAM.
|
|
//
|
|
//
|
|
- pulSrc = &_etext;
|
|
|
|
- for(pulDest = &_data; pulDest < &_edata; )
|
|
|
|
|
|
+ pulSrc = &_sidata;
|
|
|
|
+ for(pulDest = &_sdata; pulDest < &_edata; )
|
|
{
|
|
{
|
|
*pulDest++ = *pulSrc++;
|
|
*pulDest++ = *pulSrc++;
|
|
}
|
|
}
|
|
@@ -266,7 +266,7 @@ ResetISR(void)
|
|
//
|
|
//
|
|
// Zero fill the bss segment.
|
|
// Zero fill the bss segment.
|
|
//
|
|
//
|
|
- __asm(" ldr r0, =_bss\n"
|
|
|
|
|
|
+ __asm(" ldr r0, =_sbss\n"
|
|
" ldr r1, =_ebss\n"
|
|
" ldr r1, =_ebss\n"
|
|
" mov r2, #0\n"
|
|
" mov r2, #0\n"
|
|
" .thumb_func\n"
|
|
" .thumb_func\n"
|