mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Related to Zynq demo: Remove compiler warnings when configASSERT() is not defined and set the type of the assembly functions to allow them to be called when the C code is compiled to THUMB instructions.
This commit is contained in:
parent
f843888e60
commit
481db56078
|
@ -25,7 +25,7 @@
|
|||
<inputType id="xilinx.gnu.assembler.input.401366857" superClass="xilinx.gnu.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="xilinx.gnu.arm.c.toolchain.compiler.debug.399974114" name="ARM gcc compiler" superClass="xilinx.gnu.arm.c.toolchain.compiler.debug">
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<option id="xilinx.gnu.compiler.inferred.swplatform.includes.2019787450" name="Software Platform Include Path" superClass="xilinx.gnu.compiler.inferred.swplatform.includes" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../../RTOSDemo_bsp/ps7_cortexa9_0/include"/>
|
||||
|
@ -79,6 +79,18 @@
|
|||
<tool id="xilinx.gnu.arm.size.debug.484243311" name="ARM Print Size" superClass="xilinx.gnu.arm.size.debug"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<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">
|
||||
<tool id="xilinx.gnu.arm.c.toolchain.compiler.debug.399974114.1026417292" name="ARM gcc compiler" superClass="xilinx.gnu.arm.c.toolchain.compiler.debug.399974114">
|
||||
<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"/>
|
||||
<inputType id="xilinx.gnu.arm.c.compiler.input.1501099958" name="C source files" superClass="xilinx.gnu.arm.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool customBuildStep="true" id="org.eclipse.cdt.managedbuilder.ui.rcbs.251123203" name="Resource Custom Build Step">
|
||||
<inputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.inputtype.1170511444" name="Resource Custom Build Step Input Type">
|
||||
<additionalInput kind="additionalinputdependency" paths=""/>
|
||||
</inputType>
|
||||
<outputType id="org.eclipse.cdt.managedbuilder.ui.rcbs.outputtype.386600654" name="Resource Custom Build Step Output Type"/>
|
||||
</tool>
|
||||
</fileInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
|
|
|
@ -159,12 +159,6 @@ readable ASCII form. See the notes in the implementation of vTaskList() within
|
|||
FreeRTOS/Source/tasks.c for limitations. */
|
||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
|
||||
|
||||
/* The following constant describe the hardware, and are correct for the
|
||||
Zynq MPU. */
|
||||
#define configINTERRUPT_CONTROLLER_BASE_ADDRESS ( XPAR_PS7_SCUGIC_0_DIST_BASEADDR )
|
||||
#define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET ( -0xf00 )
|
||||
#define configUNIQUE_INTERRUPT_PRIORITIES 32
|
||||
|
||||
/* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS is not required because the time base
|
||||
comes from the ulHighFrequencyTimerCounts variable which is incremented in a
|
||||
high frequency timer that is already being started as part of the interrupt
|
||||
|
@ -200,10 +194,14 @@ void vAssertCalled( const char * pcFile, unsigned long ulLine );
|
|||
void vConfigureTickInterrupt( void );
|
||||
#define configSETUP_TICK_INTERRUPT() vConfigureTickInterrupt()
|
||||
|
||||
#define configINSTALL_FREERTOS_VECTOR_TABLE 1
|
||||
|
||||
void vClearTickInterrupt( void );
|
||||
#define configCLEAR_TICK_INTERRUPT() vClearTickInterrupt()
|
||||
|
||||
/* The following constant describe the hardware, and are correct for the
|
||||
Zynq MPU. */
|
||||
#define configINTERRUPT_CONTROLLER_BASE_ADDRESS ( XPAR_PS7_SCUGIC_0_DIST_BASEADDR )
|
||||
#define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET ( -0xf00 )
|
||||
#define configUNIQUE_INTERRUPT_PRIORITIES 32
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
|
||||
|
|
|
@ -63,10 +63,9 @@
|
|||
|
||||
#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,67 +93,49 @@ _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 */
|
||||
|
||||
ldmia sp!,{r0-r3,r12,lr} /* state restore from compiled code */
|
||||
|
||||
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 */
|
||||
|
||||
.align 4
|
||||
.type vPortInstallFreeRTOSVectorTable, %function
|
||||
vPortInstallFreeRTOSVectorTable:
|
||||
|
||||
/* 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
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@ const uint8_t ucRisingEdge = 3;
|
|||
pxGICConfig = XScuGic_LookupConfig( XPAR_SCUGIC_SINGLE_DEVICE_ID );
|
||||
xStatus = XScuGic_CfgInitialize( &xInterruptController, pxGICConfig, pxGICConfig->CpuBaseAddress );
|
||||
configASSERT( xStatus == XST_SUCCESS );
|
||||
( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */
|
||||
|
||||
/* The priority must be the lowest possible. */
|
||||
XScuGic_SetPriorityTriggerType( &xInterruptController, XPAR_SCUTIMER_INTR, portLOWEST_USABLE_INTERRUPT_PRIORITY << portPRIORITY_SHIFT, ucRisingEdge );
|
||||
|
@ -106,11 +107,13 @@ const uint8_t ucRisingEdge = 3;
|
|||
/* Install the FreeRTOS tick handler. */
|
||||
xStatus = XScuGic_Connect( &xInterruptController, XPAR_SCUTIMER_INTR, (Xil_ExceptionHandler) FreeRTOS_Tick_Handler, ( void * ) &xTimer );
|
||||
configASSERT( xStatus == XST_SUCCESS );
|
||||
( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */
|
||||
|
||||
/* Initialise the timer. */
|
||||
pxTimerConfig = XScuTimer_LookupConfig( XPAR_SCUTIMER_DEVICE_ID );
|
||||
xStatus = XScuTimer_CfgInitialize( &xTimer, pxTimerConfig, pxTimerConfig->BaseAddr );
|
||||
configASSERT( xStatus == XST_SUCCESS );
|
||||
( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */
|
||||
|
||||
/* Enable Auto reload mode. */
|
||||
XScuTimer_EnableAutoReload( &xTimer );
|
||||
|
|
|
@ -81,6 +81,7 @@
|
|||
.arm
|
||||
|
||||
/* This function is explained in the comments at the top of main-full.c. */
|
||||
.type vRegTest1Implementation, %function
|
||||
vRegTest1Implementation:
|
||||
|
||||
/* Fill each general purpose register with a known value. */
|
||||
|
@ -370,6 +371,7 @@ reg1_error_loop:
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
.type vRegTest2Implementation, %function
|
||||
vRegTest2Implementation:
|
||||
|
||||
/* Put a known value in each register. */
|
||||
|
|
|
@ -150,6 +150,7 @@ XUartPs_Config *pxConfig;
|
|||
/* Initialise the driver. */
|
||||
xStatus = XUartPs_CfgInitialize( &xUARTInstance, pxConfig, XPAR_PS7_UART_1_BASEADDR );
|
||||
configASSERT( xStatus == XST_SUCCESS );
|
||||
( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */
|
||||
|
||||
/* Misc. parameter configuration. */
|
||||
XUartPs_SetBaudRate( &xUARTInstance, ulWantedBaud );
|
||||
|
@ -159,6 +160,7 @@ XUartPs_Config *pxConfig;
|
|||
file. */
|
||||
xStatus = XScuGic_Connect( &xInterruptController, XPAR_XUARTPS_1_INTR, (Xil_ExceptionHandler) prvUART_Handler, (void *) &xUARTInstance );
|
||||
configASSERT( xStatus == XST_SUCCESS );
|
||||
( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */
|
||||
|
||||
/* Ensure interrupts start clear. */
|
||||
XUartPs_WriteReg( XPAR_PS7_UART_1_BASEADDR, XUARTPS_ISR_OFFSET, XUARTPS_IXR_MASK );
|
||||
|
@ -243,6 +245,9 @@ char cChar;
|
|||
|
||||
configASSERT( pvNotUsed == &xUARTInstance );
|
||||
|
||||
/* Remove compile warnings if configASSERT() is not defined. */
|
||||
( void ) pvNotUsed;
|
||||
|
||||
/* Read the interrupt ID register to see which interrupt is active. */
|
||||
ulActiveInterrupts = XUartPs_ReadReg(XPAR_PS7_UART_1_BASEADDR, XUARTPS_IMR_OFFSET);
|
||||
ulActiveInterrupts &= XUartPs_ReadReg(XPAR_PS7_UART_1_BASEADDR, XUARTPS_ISR_OFFSET);
|
||||
|
|
|
@ -99,6 +99,7 @@ BaseType_t xStatus;
|
|||
pxConfigPtr = XGpioPs_LookupConfig( XPAR_XGPIOPS_0_DEVICE_ID );
|
||||
xStatus = XGpioPs_CfgInitialize( &xGpio, pxConfigPtr, pxConfigPtr->BaseAddr );
|
||||
configASSERT( xStatus == XST_SUCCESS );
|
||||
( void ) xStatus; /* Remove compiler warning if configASSERT() is not defined. */
|
||||
|
||||
/* Enable outputs and set low. */
|
||||
XGpioPs_SetDirectionPin( &xGpio, partstLED_OUTPUT, partstDIRECTION_OUTPUT );
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
|
||||
/* 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();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ BEGIN PROCESSOR
|
|||
PARAMETER DRIVER_NAME = cpu_cortexa9
|
||||
PARAMETER DRIVER_VER = 1.01.a
|
||||
PARAMETER HW_INSTANCE = ps7_cortexa9_0
|
||||
PARAMETER EXTRA_COMPILER_FLAGS = -g -O0
|
||||
END
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue