]> git.sur5r.net Git - freertos/commitdiff
Related to Zynq demo: Remove compiler warnings when configASSERT() is not defined...
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 4 Feb 2014 14:53:17 +0000 (14:53 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 4 Feb 2014 14:53:17 +0000 (14:53 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2190 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/.cproject
FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOSConfig.h
FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOS_asm_vectors.S
FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/FreeRTOS_tick_config.c
FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/reg_test.S
FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/serial.c
FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/ParTest.c
FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/main.c
FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo_bsp/system.mss

index 3b5e4b445529a65617b17c2c9ccb6b5ede0d58bf..e9a27c182116512d3030b190eda73b0512cf749f 100644 (file)
@@ -25,7 +25,7 @@
                                                                <inputType id="xilinx.gnu.assembler.input.401366857" superClass="xilinx.gnu.assembler.input"/>\r
                                                        </tool>\r
                                                        <tool id="xilinx.gnu.arm.c.toolchain.compiler.debug.399974114" name="ARM gcc compiler" superClass="xilinx.gnu.arm.c.toolchain.compiler.debug">\r
-                                                               <option defaultValue="gnu.c.optimization.level.none" id="xilinx.gnu.compiler.option.optimization.level.117590421" name="Optimization Level" superClass="xilinx.gnu.compiler.option.optimization.level" valueType="enumerated"/>\r
+                                                               <option defaultValue="gnu.c.optimization.level.none" id="xilinx.gnu.compiler.option.optimization.level.117590421" name="Optimization Level" superClass="xilinx.gnu.compiler.option.optimization.level" value="gnu.c.optimization.level.none" valueType="enumerated"/>\r
                                                                <option id="xilinx.gnu.compiler.option.debugging.level.1790313049" name="Debug Level" superClass="xilinx.gnu.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>\r
                                                                <option id="xilinx.gnu.compiler.inferred.swplatform.includes.2019787450" name="Software Platform Include Path" superClass="xilinx.gnu.compiler.inferred.swplatform.includes" valueType="includePath">\r
                                                                        <listOptionValue builtIn="false" value="../../RTOSDemo_bsp/ps7_cortexa9_0/include"/>\r
                                                        <tool id="xilinx.gnu.arm.size.debug.484243311" name="ARM Print Size" superClass="xilinx.gnu.arm.size.debug"/>\r
                                                </toolChain>\r
                                        </folderInfo>\r
+                                       <fileInfo id="xilinx.gnu.arm.exe.debug.2107277346.2099160792" name="portASM.S" rcbsApplicability="disable" resourcePath="src/FreeRTOS_Source/portable/GCC/ARM_CA9/portASM.S" toolsToInvoke="xilinx.gnu.arm.c.toolchain.compiler.debug.399974114.1026417292">\r
+                                               <tool id="xilinx.gnu.arm.c.toolchain.compiler.debug.399974114.1026417292" name="ARM gcc compiler" superClass="xilinx.gnu.arm.c.toolchain.compiler.debug.399974114">\r
+                                                       <option id="xilinx.gnu.compiler.misc.other.767287753" name="Other flags" superClass="xilinx.gnu.compiler.misc.other" value="-c -fmessage-length=0 -Wextra -mthumb" valueType="string"/>\r
+                                                       <inputType id="xilinx.gnu.arm.c.compiler.input.1501099958" name="C source files" superClass="xilinx.gnu.arm.c.compiler.input"/>\r
+                                               </tool>\r
+                                               <tool customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.251123203" name="Resource Custom Build Step">\r
+                                                       <inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.1170511444" name="Resource Custom Build Step Input Type">\r
+                                                               <additionalInput kind="additionalinputdependency" paths=""/>\r
+                                                       </inputType>\r
+                                                       <outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.386600654" name="Resource Custom Build Step Output Type"/>\r
+                                               </tool>\r
+                                       </fileInfo>\r
                                </configuration>\r
                        </storageModule>\r
                        <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>\r
index b37a4e40f667d753d6c881cdebdf866cd4ea8550..acfda1d370adf7e368327bfc3c8f85382b2da159 100644 (file)
@@ -159,12 +159,6 @@ readable ASCII form.  See the notes in the implementation of vTaskList() within
 FreeRTOS/Source/tasks.c for limitations. */\r
 #define configUSE_STATS_FORMATTING_FUNCTIONS   1\r
 \r
-/* The following constant describe the hardware, and are correct for the\r
-Zynq MPU. */\r
-#define configINTERRUPT_CONTROLLER_BASE_ADDRESS                ( XPAR_PS7_SCUGIC_0_DIST_BASEADDR )\r
-#define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET ( -0xf00 )\r
-#define configUNIQUE_INTERRUPT_PRIORITIES                              32\r
-\r
 /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS is not required because the time base\r
 comes from the ulHighFrequencyTimerCounts variable which is incremented in a\r
 high frequency timer that is already being started as part of the interrupt\r
@@ -200,10 +194,14 @@ void vAssertCalled( const char * pcFile, unsigned long ulLine );
 void vConfigureTickInterrupt( void );\r
 #define configSETUP_TICK_INTERRUPT() vConfigureTickInterrupt()\r
 \r
-#define configINSTALL_FREERTOS_VECTOR_TABLE 1\r
-\r
 void vClearTickInterrupt( void );\r
 #define configCLEAR_TICK_INTERRUPT() vClearTickInterrupt()\r
 \r
+/* The following constant describe the hardware, and are correct for the\r
+Zynq MPU. */\r
+#define configINTERRUPT_CONTROLLER_BASE_ADDRESS                ( XPAR_PS7_SCUGIC_0_DIST_BASEADDR )\r
+#define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET ( -0xf00 )\r
+#define configUNIQUE_INTERRUPT_PRIORITIES                              32\r
+\r
 #endif /* FREERTOS_CONFIG_H */\r
 \r
index a9a9bccb9202070bc145eefda50f25eb006c301c..f46de6e28a4f06bf7526cfbbaee1ee8763c2fdcf 100644 (file)
 
 #include "xil_errata.h"
 
-#define __ARM_NEON__ 1
-
 .org 0
 .text
+.arm
 
 .global _boot
 .global _freertos_vector_table
@@ -74,6 +73,7 @@
 .global FIQInterrupt
 .global DataAbortInterrupt
 .global PrefetchAbortInterrupt
+.global vPortInstallFreeRTOSVectorTable
 
 .extern FreeRTOS_IRQ_Handler
 .extern FreeRTOS_SWI_Handler
@@ -93,66 +93,48 @@ _irq:   .word FreeRTOS_IRQ_Handler
 _swi:   .word FreeRTOS_SWI_Handler
 
 
-
-FreeRTOS_FIQHandler:                                   /* FIQ vector handler */
-       stmdb   sp!,{r0-r3,r12,lr}              /* state save from compiled code */
-#ifdef __ARM_NEON__
-       vpush {d0-d7}
-       vpush {d16-d31}
-       vmrs r1, FPSCR
-       push {r1}
-       vmrs r1, FPEXC
-       push {r1}
-#endif
-
+.align 4
+FreeRTOS_FIQHandler:                   /* FIQ vector handler */
+       stmdb   sp!,{r0-r3,r12,lr}      /* state save from compiled code */
 FIQLoop:
-       bl      FIQInterrupt                    /* FIQ vector */
-
-#ifdef __ARM_NEON__
-       pop     {r1}
-       vmsr    FPEXC, r1
-       pop     {r1}
-       vmsr    FPSCR, r1
-       vpop    {d16-d31}
-       vpop    {d0-d7}
-#endif
-       ldmia   sp!,{r0-r3,r12,lr}              /* state restore from compiled code */
+       blx     FIQInterrupt                    /* FIQ vector */
+       ldmia   sp!,{r0-r3,r12,lr}      /* state restore from compiled code */
        subs    pc, lr, #4                      /* adjust return */
 
+.align 4
+FreeRTOS_Undefined:                            /* Undefined handler */
+       b               .
 
-FreeRTOS_Undefined:                                    /* Undefined handler */
-       stmdb   sp!,{r0-r3,r12,lr}              /* state save from compiled code */
-
-       ldmia   sp!,{r0-r3,r12,lr}              /* state restore from compiled code */
-
-       b       _prestart                       
-
-       movs    pc, lr
-
-
-FreeRTOS_DataAbortHandler:                             /* Data Abort handler */
+.align 4
+FreeRTOS_DataAbortHandler:             /* Data Abort handler */
 #ifdef CONFIG_ARM_ERRATA_775420
        dsb
 #endif
-       stmdb   sp!,{r0-r3,r12,lr}              /* state save from compiled code */
-
-       bl      DataAbortInterrupt              /*DataAbortInterrupt :call C function here */
-
-       ldmia   sp!,{r0-r3,r12,lr}              /* state restore from compiled code */
-
+       stmdb   sp!,{r0-r3,r12,lr}      /* state save from compiled code */
+       blx     DataAbortInterrupt              /*DataAbortInterrupt :call C function here */
+       ldmia   sp!,{r0-r3,r12,lr}      /* state restore from compiled code */
        subs    pc, lr, #4                      /* adjust return */
 
-FreeRTOS_PrefetchAbortHandler:                         /* Prefetch Abort handler */
+.align 4
+FreeRTOS_PrefetchAbortHandler: /* Prefetch Abort handler */
 #ifdef CONFIG_ARM_ERRATA_775420
        dsb
 #endif
-       stmdb   sp!,{r0-r3,r12,lr}              /* state save from compiled code */
-
-       bl      PrefetchAbortInterrupt          /* PrefetchAbortInterrupt: call C function here */
+       stmdb   sp!,{r0-r3,r12,lr}      /* state save from compiled code */
+       blx     PrefetchAbortInterrupt  /* PrefetchAbortInterrupt: call C function here */
+       ldmia   sp!,{r0-r3,r12,lr}      /* state restore from compiled code */
+       subs    pc, lr, #4                      /* adjust return */
 
-       ldmia   sp!,{r0-r3,r12,lr}              /* state restore from compiled code */
+.align 4
+.type vPortInstallFreeRTOSVectorTable, %function
+vPortInstallFreeRTOSVectorTable:
 
-       subs    pc, lr, #4                      /* adjust return */
+       /* Set VBAR to the vector table that contains the FreeRTOS handlers. */
+       ldr     r0, =_freertos_vector_table
+       mcr     p15, 0, r0, c12, c0, 0
+       dsb
+       isb
+       bx lr
 
 
 .end
index fb2796f1914fd75e9c20c39be3818fb296910e04..6715713a006603048d28f480071b13f4cfc863b2 100644 (file)
@@ -99,6 +99,7 @@ const uint8_t ucRisingEdge = 3;
        pxGICConfig = XScuGic_LookupConfig( XPAR_SCUGIC_SINGLE_DEVICE_ID );\r
        xStatus = XScuGic_CfgInitialize( &xInterruptController, pxGICConfig, pxGICConfig->CpuBaseAddress );\r
        configASSERT( xStatus == XST_SUCCESS );\r
+       ( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */\r
 \r
        /* The priority must be the lowest possible. */\r
        XScuGic_SetPriorityTriggerType( &xInterruptController, XPAR_SCUTIMER_INTR, portLOWEST_USABLE_INTERRUPT_PRIORITY << portPRIORITY_SHIFT, ucRisingEdge );\r
@@ -106,11 +107,13 @@ const uint8_t ucRisingEdge = 3;
        /* Install the FreeRTOS tick handler. */\r
        xStatus = XScuGic_Connect( &xInterruptController, XPAR_SCUTIMER_INTR, (Xil_ExceptionHandler) FreeRTOS_Tick_Handler, ( void * ) &xTimer );\r
        configASSERT( xStatus == XST_SUCCESS );\r
+       ( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */\r
 \r
        /* Initialise the timer. */\r
        pxTimerConfig = XScuTimer_LookupConfig( XPAR_SCUTIMER_DEVICE_ID );\r
        xStatus = XScuTimer_CfgInitialize( &xTimer, pxTimerConfig, pxTimerConfig->BaseAddr );\r
        configASSERT( xStatus == XST_SUCCESS );\r
+       ( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */\r
 \r
        /* Enable Auto reload mode. */\r
        XScuTimer_EnableAutoReload( &xTimer );\r
index 694113edc5645b45ddd3036f9fb9d7bcf492944b..91a7aaddfe3cc37f2f2d17ee6bc1178498fac274 100644 (file)
@@ -81,6 +81,7 @@
        .arm\r
 \r
        /* This function is explained in the comments at the top of main-full.c. */\r
+.type vRegTest1Implementation, %function\r
 vRegTest1Implementation:\r
 \r
        /* Fill each general purpose register with a known value. */\r
@@ -370,6 +371,7 @@ reg1_error_loop:
 \r
 /*-----------------------------------------------------------*/\r
 \r
+.type vRegTest2Implementation, %function\r
 vRegTest2Implementation:\r
 \r
        /* Put a known value in each register. */\r
index cf154578b16742d6fdca68c27e4bc0f56fed0bd8..8a270316f6253e39c2ac2860483bc3d640d0d956 100644 (file)
@@ -150,6 +150,7 @@ XUartPs_Config *pxConfig;
        /* Initialise the driver. */\r
        xStatus = XUartPs_CfgInitialize( &xUARTInstance, pxConfig, XPAR_PS7_UART_1_BASEADDR );\r
        configASSERT( xStatus == XST_SUCCESS );\r
+       ( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */\r
 \r
        /* Misc. parameter configuration. */\r
        XUartPs_SetBaudRate( &xUARTInstance, ulWantedBaud );\r
@@ -159,6 +160,7 @@ XUartPs_Config *pxConfig;
        file. */\r
        xStatus = XScuGic_Connect( &xInterruptController, XPAR_XUARTPS_1_INTR,  (Xil_ExceptionHandler) prvUART_Handler, (void *) &xUARTInstance );\r
        configASSERT( xStatus == XST_SUCCESS );\r
+       ( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */\r
 \r
        /* Ensure interrupts start clear. */\r
        XUartPs_WriteReg( XPAR_PS7_UART_1_BASEADDR, XUARTPS_ISR_OFFSET, XUARTPS_IXR_MASK );\r
@@ -243,6 +245,9 @@ char cChar;
 \r
        configASSERT( pvNotUsed == &xUARTInstance );\r
 \r
+       /* Remove compile warnings if configASSERT() is not defined. */\r
+       ( void ) pvNotUsed;\r
+\r
        /* Read the interrupt ID register to see which interrupt is active. */\r
        ulActiveInterrupts = XUartPs_ReadReg(XPAR_PS7_UART_1_BASEADDR,  XUARTPS_IMR_OFFSET);\r
        ulActiveInterrupts &= XUartPs_ReadReg(XPAR_PS7_UART_1_BASEADDR,  XUARTPS_ISR_OFFSET);\r
index 54753a43ef498164a60be636feaf26e82aa3d871..d1ec2ed050e1b03bcd2575db6a088b42546f5e00 100644 (file)
@@ -99,6 +99,7 @@ BaseType_t xStatus;
        pxConfigPtr = XGpioPs_LookupConfig( XPAR_XGPIOPS_0_DEVICE_ID );\r
        xStatus = XGpioPs_CfgInitialize( &xGpio, pxConfigPtr, pxConfigPtr->BaseAddr );\r
        configASSERT( xStatus == XST_SUCCESS );\r
+       ( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */\r
 \r
        /* Enable outputs and set low. */\r
        XGpioPs_SetDirectionPin( &xGpio, partstLED_OUTPUT, partstDIRECTION_OUTPUT );\r
index 280f4404fd1d83e0851d8e534321cf01fcbce5a8..02873160de913d578db84958f77e5cbed47db59c 100644 (file)
 
 /* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,
 or 0 to run the more comprehensive test and demo application. */
-#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY     0
+#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY     1
 
 /*-----------------------------------------------------------*/
 
@@ -128,6 +128,14 @@ static void prvSetupHardware( void );
        extern void main_full( void );
 #endif /* #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 */
 
+/*
+ * The Xilinx projects use a BSP that do not allow the start up code to be
+ * altered easily.  Therefore the vector table used by FreeRTOS is defined in
+ * FreeRTOS_asm_vectors.S, which is part of this project.  Switch to use the
+ * FreeRTOS vector table.
+ */
+extern void vPortInstallFreeRTOSVectorTable( void );
+
 /* Prototypes for the standard FreeRTOS callback/hook functions implemented
 within this file. */
 void vApplicationMallocFailedHook( void );
@@ -187,9 +195,16 @@ XScuGic_Config *pxGICConfig;
        /* Install a default handler for each GIC interrupt. */
        xStatus = XScuGic_CfgInitialize( &xInterruptController, pxGICConfig, pxGICConfig->CpuBaseAddress );
        configASSERT( xStatus == XST_SUCCESS );
+       ( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */
 
        /* Initialise the LED port. */
        vParTestInitialise();
+
+       /* The Xilinx projects use a BSP that do not allow the start up code to be
+       altered easily.  Therefore the vector table used by FreeRTOS is defined in
+       FreeRTOS_asm_vectors.S, which is part of this project.  Switch to use the
+       FreeRTOS vector table. */
+       vPortInstallFreeRTOSVectorTable();
 }
 /*-----------------------------------------------------------*/
 
index b2637b0a8c28c2fdab7f76685a6d8b54f82f5c94..dec7138ff2509219a9829639ae3285ecb9e17c13 100644 (file)
@@ -15,7 +15,6 @@ BEGIN PROCESSOR
  PARAMETER DRIVER_NAME = cpu_cortexa9\r
  PARAMETER DRIVER_VER = 1.01.a\r
  PARAMETER HW_INSTANCE = ps7_cortexa9_0\r
- PARAMETER EXTRA_COMPILER_FLAGS = -g -O0\r
 END\r
 \r
 \r