Rename CORTEX_M)_Infineion_Boot_Kits_IAR_Keil to CORTEX_M0_Infineon_XMC1000_IAR_Keil_GCC as it now contains projects for all three compilers.

pull/4/head
Richard Barry 12 years ago
parent 245ff12be8
commit 33bd63e287

@ -115,20 +115,6 @@ We use --gc-sections when linking, so there is no harm is setting all of these t
#define BLOCKQ_1 1
/* A task is created to test the behaviour of the interrupt controller during
context switches. This macro is just used to set a variable to true each time
the test task is switched out - the task itself needs to know when this happens
in order to complete its tests. This macro will slow down the context switch
and can normally be removed (just delete the whole macro, although doing so will
cause the test task to indicate an error). */
extern void *xICTestTask;
extern volatile unsigned long ulTaskSwitchedOut;
#define traceTASK_SWITCHED_OUT() if( pxCurrentTCB == xICTestTask ) ulTaskSwitchedOut = pdTRUE
#endif /* FREERTOS_CONFIG_H */

@ -77,33 +77,15 @@
static void vRegTest1( void *pvParameters );
static void vRegTest2( void *pvParameters );
/*
* A task that tests the management of the Interrupt Controller (IC) during a
* context switch. The state of the IC current mask level must be maintained
* across context switches. Also, yields must be able to be performed when the
* interrupt controller mask is not zero. This task tests both these
* requirements.
*/
static void prvICCheck1Task( void *pvParameters );
/* Counters used to ensure the tasks are still running. */
static volatile unsigned long ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL, ulICTestCounter = 0UL;
static volatile unsigned long ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;
/* Handle to the task that checks the interrupt controller behaviour. This is
used by the traceTASK_SWITCHED_OUT() macro, which is defined in
FreeRTOSConfig.h and can be removed - it is just for the purpose of this test. */
xTaskHandle xICTestTask = NULL;
/* Variable that gets set to pdTRUE by traceTASK_SWITCHED_OUT each time
is switched out. */
volatile unsigned long ulTaskSwitchedOut;
/*-----------------------------------------------------------*/
void vStartRegTestTasks( void )
{
xTaskCreate( vRegTest1, ( signed char * ) "RTest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( vRegTest2, ( signed char * ) "RTest1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( prvICCheck1Task, ( signed char * ) "ICCheck", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, &xICTestTask );
}
/*-----------------------------------------------------------*/
@ -232,61 +214,9 @@ static void vRegTest2( void *pvParameters )
}
/*-----------------------------------------------------------*/
static void prvICCheck1Task( void *pvParameters )
{
long lICCheckStatus = pdPASS;
for( ;; )
{
/* At this point the interrupt mask should be zero. */
if( ic->cpl != 0 )
{
lICCheckStatus = pdFAIL;
}
/* If we yield here, it should still be 0 when the task next runs.
ulTaskSwitchedOut is just used to check that a switch does actually
happen. */
ulTaskSwitchedOut = pdFALSE;
taskYIELD();
if( ( ulTaskSwitchedOut != pdTRUE ) || ( ic->cpl != 0 ) )
{
lICCheckStatus = pdFAIL;
}
/* Set the interrupt mask to portSYSTEM_INTERRUPT_PRIORITY_LEVEL + 1,
before checking it is as expected. */
taskENTER_CRITICAL();
if( ic->cpl != ( portSYSTEM_INTERRUPT_PRIORITY_LEVEL + 1 ) )
{
lICCheckStatus = pdFAIL;
}
/* If we yield here, it should still be
portSYSTEM_INTERRUPT_PRIORITY_LEVEL + 10 when the task next runs. */
ulTaskSwitchedOut = pdFALSE;
taskYIELD();
if( ( ulTaskSwitchedOut != pdTRUE ) || ( ic->cpl != ( portSYSTEM_INTERRUPT_PRIORITY_LEVEL + 1 ) ) )
{
lICCheckStatus = pdFAIL;
}
/* Return the interrupt mask to its default state. */
taskEXIT_CRITICAL();
/* Just increment a loop counter so the check task knows if this task
is still running or not. */
if( lICCheckStatus == pdPASS )
{
ulICTestCounter++;
}
}
}
/*-----------------------------------------------------------*/
portBASE_TYPE xAreRegTestTasksStillRunning( void )
{
static unsigned long ulLastCounter1 = 0UL, ulLastCounter2 = 0UL, ulLastICTestCounter = 0UL;
static unsigned long ulLastCounter1 = 0UL, ulLastCounter2 = 0UL;
long lReturn;
/* Check that both loop counters are still incrementing, indicating that
@ -299,10 +229,6 @@ long lReturn;
{
lReturn = pdFAIL;
}
else if( ulLastICTestCounter == ulICTestCounter )
{
lReturn = pdFAIL;
}
else
{
lReturn = pdPASS;
@ -310,21 +236,6 @@ long lReturn;
ulLastCounter1 = ulRegTest1Counter;
ulLastCounter2 = ulRegTest2Counter;
ulLastICTestCounter = ulICTestCounter;
return lReturn;
}

@ -96,7 +96,6 @@ static void prvRxHandler( void ) __attribute__((noinline));
transmitted. */
static xQueueHandle xRxedChars;
static xQueueHandle xCharsForTx;
extern unsigned portBASE_TYPE *pxVectorTable;
/*-----------------------------------------------------------*/
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
@ -112,9 +111,7 @@ xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned port
uart1->tx_mask = 0;
uart1->rx_mask = 1;
irq[IRQ_UART1_TX].ien = 1;
irq[IRQ_UART1_TX].ipl = portSYSTEM_INTERRUPT_PRIORITY_LEVEL;
irq[IRQ_UART1_RX].ien = 1;
irq[IRQ_UART1_RX].ipl = portSYSTEM_INTERRUPT_PRIORITY_LEVEL;
}
return ( xComPortHandle ) 0;

Loading…
Cancel
Save