Add SVC handler to startup and recursive mutexes to the list of test tasks.

pull/1/head
Richard Barry 17 years ago
parent 62f9bdef17
commit 85c789dc2a

@ -39,7 +39,8 @@ CC=arm-none-eabi-gcc
OBJCOPY=arm-none-eabi-objcopy
LDSCRIPT=standalone.ld
LINKER_FLAGS=-nostartfiles -Xlinker -oRTOSDemo.axf -Xlinker -M -Xlinker -Map=rtosdemo.map
# should use --gc-sections but the debugger does not seem to be able to cope with the option.
LINKER_FLAGS=-nostartfiles -Xlinker -oRTOSDemo.axf -Xlinker -M -Xlinker -Map=rtosdemo.map -Xlinker --no-gc-sections
DEBUG=-g
OPTIM=-O0
@ -48,7 +49,7 @@ OPTIM=-O0
CFLAGS=$(DEBUG) -I . -I $(RTOS_SOURCE_DIR)/include -I $(RTOS_SOURCE_DIR)/portable/GCC/ARM_CM3 \
-I $(DEMO_INCLUDE_DIR) -D GCC_ARMCM3_LM3S102 -D inline= -mthumb -mcpu=cortex-m3 $(OPTIM) -T$(LDSCRIPT) \
-D PACK_STRUCT_END=__attribute\(\(packed\)\) -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) -D sprintf=usprintf -D snprintf=usnprintf -D printf=uipprintf \
-I $(UIP_COMMON_DIR) -I ./webserver -ffunction-sections -fdata-sections -Wl,--no-gc-sections -I $(LUMINARY_DRIVER_DIR)
-I $(UIP_COMMON_DIR) -I ./webserver -ffunction-sections -fdata-sections -I $(LUMINARY_DRIVER_DIR)
SOURCE= main.c \
timertest.c \
@ -64,6 +65,7 @@ SOURCE= main.c \
$(DEMO_COMMON_DIR)/semtest.c \
$(DEMO_COMMON_DIR)/GenQTest.c \
$(DEMO_COMMON_DIR)/QPeek.c \
$(DEMO_COMMON_DIR)/recmutex.c \
./webserver/uIP_Task.c \
./webserver/emac.c \
./webserver/httpd.c \

@ -97,6 +97,7 @@
#include "bitmap.h"
#include "GenQTest.h"
#include "QPeek.h"
#include "recmutex.h"
/* Hardware library includes. */
#include "hw_memmap.h"
@ -214,6 +215,7 @@ int main( void )
vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );
vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );
vStartQueuePeekTasks();
vStartRecursiveMutexTasks();
/* Start the tasks defined within this file/specific to this demo. */
xTaskCreate( vOLEDTask, ( signed portCHAR * ) "OLED", mainOLED_TASK_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
@ -303,6 +305,10 @@ static unsigned portLONG ulTicksSinceLastDisplay = 0;
else if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
{
xMessage.pcMessage = "ERROR IN MATH";
}
else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )
{
xMessage.pcMessage = "ERROR IN REC MUTEX";
}
else if( ulIdleError != pdFALSE )
{
@ -321,6 +327,7 @@ xOLEDMessage xMessage;
unsigned portLONG ulY, ulMaxY;
static portCHAR cMessage[ mainMAX_MSG_LEN ];
extern unsigned portLONG ulMaxJitter;
unsigned portBASE_TYPE uxUnusedStackOnEntry, uxUnusedStackNow;
/* Functions to access the OLED. The one used depends on the dev kit
being used. */
@ -329,6 +336,9 @@ void ( *vOLEDStringDraw )( const portCHAR *, unsigned portLONG, unsigned portLON
void ( *vOLEDImageDraw )( const unsigned portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portLONG, unsigned portLONG );
void ( *vOLEDClear )( void );
/* Just for demo purposes. */
uxUnusedStackOnEntry = uxTaskGetStackHighWaterMark( NULL );
/* Map the OLED access functions to the driver functions that are appropriate
for the evaluation kit being used. */
switch( HWREG( SYSCTL_DID1 ) & SYSCTL_DID1_PRTNO_MASK )
@ -356,6 +366,8 @@ void ( *vOLEDClear )( void );
vOLEDStringDraw( " POWERED BY FreeRTOS", 0, 0, mainFULL_SCALE );
vOLEDImageDraw( pucImage, 0, mainCHARACTER_HEIGHT + 1, bmpBITMAP_WIDTH, bmpBITMAP_HEIGHT );
uxUnusedStackNow = uxTaskGetStackHighWaterMark( NULL );
for( ;; )
{
/* Wait for a message to arrive that requires displaying. */
@ -437,6 +449,10 @@ void vApplicationIdleHook( void )
" .align 2 \n"
"ulIdleErrorConst: .word ulIdleError" );
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )
{
for( ;; );
}

@ -43,6 +43,7 @@ static void IntDefaultHandler(void);
extern int main(void);
extern void xPortPendSVHandler(void);
extern void xPortSysTickHandler(void);
extern void vPortSVCHandler( void );
extern void Timer0IntHandler( void );
extern void vEMAC_ISR(void);
@ -78,7 +79,7 @@ void (* const g_pfnVectors[])(void) =
0, // Reserved
0, // Reserved
0, // Reserved
IntDefaultHandler, // SVCall handler
vPortSVCHandler, // SVCall handler
IntDefaultHandler, // Debug monitor handler
0, // Reserved
xPortPendSVHandler, // The PendSV handler

Loading…
Cancel
Save