]> git.sur5r.net Git - freertos/blobdiff - Demo/CORTEX_LM3S811_IAR/startup.c
UpdUpdate IAR projects to use Embedded Workbench V5.11.
[freertos] / Demo / CORTEX_LM3S811_IAR / startup.c
index 44bd7701c5d71d4dd73765e9b8cc3af42785192c..d53376fd719961e272b1858d196af2bd9cb3455f 100644 (file)
@@ -37,7 +37,6 @@
 // Forward declaration of the default fault handlers.\r
 //\r
 //*****************************************************************************\r
-void ResetISR(void);\r
 static void NmiSR(void);\r
 static void FaultISR(void);\r
 static void IntDefaultHandler(void);\r
@@ -47,7 +46,7 @@ static void IntDefaultHandler(void);
 // The entry point for the application.\r
 //\r
 //*****************************************************************************\r
-extern int main(void);\r
+extern void __iar_program_start(void);\r
 \r
 //*****************************************************************************\r
 //\r
@@ -67,7 +66,7 @@ extern void vUART_ISR(void);
 #ifndef STACK_SIZE\r
 #define STACK_SIZE                              64\r
 #endif\r
-static unsigned long pulStack[STACK_SIZE];\r
+static unsigned long pulStack[STACK_SIZE] @ ".noinit";\r
 \r
 //*****************************************************************************\r
 //\r
@@ -90,11 +89,11 @@ uVectorEntry;
 // 0x0000.0000.\r
 //\r
 //*****************************************************************************\r
-__root const uVectorEntry g_pfnVectors[] @ "INTVEC" =\r
+__root const uVectorEntry __vector_table[] @ ".intvec" =\r
 {\r
     { .ulPtr = (unsigned long)pulStack + sizeof(pulStack) },\r
                                             // The initial stack pointer\r
-    ResetISR,                               // The reset handler\r
+    __iar_program_start,                    // The reset handler\r
     NmiSR,                                  // The NMI handler\r
     FaultISR,                               // The hard fault handler\r
     IntDefaultHandler,                      // The MPU fault handler\r
@@ -141,58 +140,6 @@ __root const uVectorEntry g_pfnVectors[] @ "INTVEC" =
     IntDefaultHandler                       // FLASH Control\r
 };\r
 \r
-//*****************************************************************************\r
-//\r
-// The following are constructs created by the linker, indicating where the\r
-// the "data" and "bss" segments reside in memory.  The initializers for the\r
-// for the "data" segment resides immediately following the "text" segment.\r
-//\r
-//*****************************************************************************\r
-#pragma segment="DATA_ID"\r
-#pragma segment="DATA_I"\r
-#pragma segment="DATA_Z"\r
-\r
-//*****************************************************************************\r
-//\r
-// This is the code that gets called when the processor first starts execution\r
-// following a reset event.  Only the absolutely necessary set is performed,\r
-// after which the application supplied entry() routine is called.  Any fancy\r
-// actions (such as making decisions based on the reset cause register, and\r
-// resetting the bits in that register) are left solely in the hands of the\r
-// application.\r
-//\r
-//*****************************************************************************\r
-void\r
-ResetISR(void)\r
-{\r
-    unsigned long *pulSrc, *pulDest, *pulEnd;\r
-\r
-    //\r
-    // Copy the data segment initializers from flash to SRAM.\r
-    //\r
-    pulSrc = __segment_begin("DATA_ID");\r
-    pulDest = __segment_begin("DATA_I");\r
-    pulEnd = __segment_end("DATA_I");\r
-    while(pulDest < pulEnd)\r
-    {\r
-        *pulDest++ = *pulSrc++;\r
-    }\r
-\r
-    //\r
-    // Zero fill the bss segment.\r
-    //\r
-    pulDest = __segment_begin("DATA_Z");\r
-    pulEnd = __segment_end("DATA_Z");\r
-    while(pulDest < pulEnd)\r
-    {\r
-        *pulDest++ = 0;\r
-    }\r
-\r
-    //\r
-    // Call the application's entry point.\r
-    //\r
-    main();\r
-}\r
 \r
 //*****************************************************************************\r
 //\r