]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil/system/CCS/msp432_startup_ccs.c
Update MSP432 projects to use updated driver library files.
[freertos] / FreeRTOS / Demo / CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil / system / CCS / msp432_startup_ccs.c
index 31d6dded3398ff78f669a12a8b96383759cf18a4..165605f22b254fe9b4a5953991f7d65d37560b1e 100644 (file)
@@ -1,38 +1,38 @@
-//*****************************************************************************\r
-//\r
-// Copyright (C) 2012 - 2014 Texas Instruments Incorporated - http://www.ti.com/ \r
-//\r
-// Redistribution and use in source and binary forms, with or without \r
-// modification, are permitted provided that the following conditions \r
-// are met:\r
-//\r
-//  Redistributions of source code must retain the above copyright \r
-//  notice, this list of conditions and the following disclaimer.\r
-//\r
-//  Redistributions in binary form must reproduce the above copyright\r
-//  notice, this list of conditions and the following disclaimer in the \r
-//  documentation and/or other materials provided with the   \r
-//  distribution.\r
-//\r
-//  Neither the name of Texas Instruments Incorporated nor the names of\r
-//  its contributors may be used to endorse or promote products derived\r
-//  from this software without specific prior written permission.\r
-//\r
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  \r
-//\r
-// MSP432 Family Interrupt Vector Table for CGT\r
-//\r
-//****************************************************************************\r
+/******************************************************************************\r
+* \r
+*  Copyright (C) 2012 - 2016 Texas Instruments Incorporated - http://www.ti.com/ \r
+* \r
+ Redistribution and use in source and binary forms, with or without \r
+ modification, are permitted provided that the following conditions \r
+ are met:\r
+* \r
+  Redistributions of source code must retain the above copyright \r
+  notice, this list of conditions and the following disclaimer.\r
+* \r
+  Redistributions in binary form must reproduce the above copyright\r
+  notice, this list of conditions and the following disclaimer in the \r
+  documentation and/or other materials provided with the   \r
+  distribution.\r
+* \r
+  Neither the name of Texas Instruments Incorporated nor the names of\r
+  its contributors may be used to endorse or promote products derived\r
+  from this software without specific prior written permission.\r
+* \r
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  \r
+* \r
+*  MSP432P401R Interrupt Vector Table and startup code for CCS TI ARM\r
+* \r
+*****************************************************************************/\r
 \r
 #include <stdint.h>\r
 #include <driverlib.h>\r
@@ -48,6 +48,8 @@ static void defaultISR(void);
 /* processor is started                                                     */\r
 extern void _c_int00(void);\r
 \r
+/* External declaration for system initialization function                  */\r
+extern void SystemInit(void);\r
 \r
 /* Linker variable that marks the top of the stack. */\r
 extern unsigned long __STACK_END;\r
@@ -67,6 +69,7 @@ extern void vT32_1_Handler( void );
 /* Intrrupt vector table.  Note that the proper constructs must be placed on this to  */\r
 /* ensure that it ends up at physical address 0x0000.0000 or at the start of          */\r
 /* the program if located at a start address other than 0.                            */\r
+#pragma RETAIN(interruptVectors)\r
 #pragma DATA_SECTION(interruptVectors, ".intvecs")\r
 void (* const interruptVectors[])(void) =\r
 {\r
@@ -163,6 +166,8 @@ void (* const interruptVectors[])(void) =
 /* application.                                                                */\r
 void resetISR(void)\r
 {\r
+    SystemInit();\r
+\r
     /* Jump to the CCS C Initialization Routine. */\r
        MAP_WDT_A_holdTimer();\r
     __asm("    .global _c_int00\n"\r
@@ -175,10 +180,16 @@ void resetISR(void)
 /* by a debugger.                                                              */\r
 static void nmiISR(void)\r
 {\r
+    /* Fault trap exempt from ULP advisor */\r
+    #pragma diag_push\r
+    #pragma CHECK_ULP("-2.1")\r
+\r
     /* Enter an infinite loop. */\r
     while(1)\r
     {\r
     }\r
+\r
+    #pragma diag_pop\r
 }\r
 \r
 \r
@@ -187,10 +198,16 @@ static void nmiISR(void)
 /* for examination by a debugger.                                               */\r
 static void faultISR(void)\r
 {\r
+    /* Fault trap exempt from ULP advisor */\r
+    #pragma diag_push\r
+    #pragma CHECK_ULP("-2.1")\r
+\r
     /* Enter an infinite loop. */\r
     while(1)\r
     {\r
     }\r
+\r
+    #pragma diag_pop\r
 }\r
 \r
 \r
@@ -199,8 +216,14 @@ static void faultISR(void)
 /* for examination by a debugger.                                               */\r
 static void defaultISR(void)\r
 {\r
+    /* Fault trap exempt from ULP advisor */\r
+    #pragma diag_push\r
+    #pragma CHECK_ULP("-2.1")\r
+\r
     /* Enter an infinite loop. */\r
     while(1)\r
     {\r
     }\r
+\r
+    #pragma diag_pop\r
 }\r