Add the death.c standard demo files to the TriCode demo.

pull/1/head
Richard Barry 14 years ago
parent 70cfbda2e8
commit 0997b286bc

@ -562,6 +562,10 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Source/portable/PLS/TriCore_1782_MPU}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/RTOSDemo/FreeRTOS_Source/portable/GCC/TriCore_1782}&quot;"/>
</option>
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.optimization.optimization.1251458415" name="Optimization Level" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.optimization.optimization" value="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.code.optimization.0" valueType="enumerated"/>
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.miscellaneous.options.538537192" name="Other options" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.miscellaneous.options" valueType="stringList">
<listOptionValue builtIn="false" value="-Wextra"/>
</option>
<inputType id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.c.inputType.1866405312" name="INPUT" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.compiler.c.inputType"/>
</tool>
<tool id="com.rt.hightec.buildsystem.tricore.new.compiler.cpp.820930352" name="TriCore C++ Compiler" superClass="com.rt.hightec.buildsystem.tricore.new.compiler.cpp">
@ -571,36 +575,9 @@
</option>
</tool>
<tool id="com.rt.hightec.buildsystem.tricore.new.linker.c.1929159535" name="TriCore C Linker" superClass="com.rt.hightec.buildsystem.tricore.new.linker.c">
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.filesToLink.236609617" name="Link order" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.filesToLink" valueType="stringList">
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\BlockQ.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\GenQTest.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\PollQ.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\QPeek.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\TimerDemo.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\blocktim.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\comtest.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\countsem.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\death.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\dynamic.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\flash.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\flop.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\integer.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\recmutex.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\Common_Demo_Source\semtest.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\list.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\GCC\TriCore_1782\MPU_Wrappers.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\GCC\TriCore_1782\port.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\GCC\TriCore_1782\porttrap.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\portable\MemMang\heap_2.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\queue.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\tasks.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\FreeRTOS_Source\timers.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\ParTest.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\ThirdPartyCode\cpufreq.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\main.o&quot;"/>
<listOptionValue builtIn="false" value="&quot;RTOSDemo\serial.o&quot;"/>
</option>
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.filesToLink.236609617" name="Link order" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.filesToLink" valueType="stringList"/>
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file.1135546526" name="Browse Linker Description File (-T)" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file" value="&quot;..\ld\iRAM.ld&quot;" valueType="string"/>
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.miscellaneous.options.695697518" name="Other options" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.miscellaneous.options" valueType="stringList"/>
</tool>
<tool id="com.rt.hightec.buildsystem.tricore.new.linker.cpp.2086148347" name="TriCore C++ Linker" superClass="com.rt.hightec.buildsystem.tricore.new.linker.cpp">
<option id="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file.998677471" name="Browse Linker Description File (-T)" superClass="com.rt.hightec.framework.buildsystem.abstract.hightec.tool.linker.general.description.file" value="..\ld\iRAM.ld&quot;" valueType="string"/>

File diff suppressed because one or more lines are too long

@ -113,7 +113,5 @@
#define BLOCKQ_1 0
#define portCLEANUP_TCB( pxTCB ) vPortReclaimCSA( ( unsigned portBASE_TYPE *) ( pxTCB ) )
#endif /* FREERTOS_CONFIG_H */

@ -78,6 +78,7 @@
#include "GenQTest.h"
#include "recmutex.h"
#include "serial.h"
#include "death.h"
/*-----------------------------------------------------------*/
/* Constants for the ComTest tasks. */
@ -91,6 +92,7 @@
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
#define mainCREATOR_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
/* The rate at which the on board LED will toggle when there is/is not an
error. */
@ -168,7 +170,9 @@ int main( void )
/* Start the check task - which is defined in this file. */
xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
/* _RB_ start the death tasks here too. */
/* This task has to be created last as it keeps account of the number of tasks
it expects to see running. */
vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );
/* Now all the tasks have been started - start the scheduler. */
vTaskStartScheduler();
@ -280,6 +284,11 @@ long lReturn = pdPASS;
lReturn = pdFAIL;
}
if( xIsCreateTaskStillRunning() != pdTRUE )
{
lReturn = pdFAIL;
}
return lReturn;
}
/*-----------------------------------------------------------*/
@ -459,7 +468,7 @@ static void prvRegTask1( void *pvParameters )
/* Load the parameter address from the stack and modify the value. */
__asm volatile( \
" ld.w %d1, [%sp]4 \n" \
" add %d1, %d15, 1 \n" \
" add %d1, 1 \n" \
" st.w [%sp]4, %d1 \n" \
" ld.a %a15, [%sp] \n" \
" st.w [%a15], %d1 \n" \
@ -504,11 +513,10 @@ static void prvRegTask2( void *pvParameters )
" mov.a %a12, 4 \n" \
" mov.a %a13, 3 \n" \
" mov.a %a14, 2 \n" );
/* Yield to force a context switch. */
taskYIELD();
/* Check the values of the registers. */
__asm volatile( " _task2_loop: \n" \
" syscall 0 \n" \
" eq %d1, %d0, 7 \n" \
" jne %d1, 1, _task2_error_loop \n" \
" eq %d1, %d1, 1 \n" \
@ -561,6 +569,7 @@ static void prvRegTask2( void *pvParameters )
" jne.a %a15, %a14, _task2_error_loop \n" \
" j _task2_skip_error_loop \n" \
"_task2_error_loop: \n" /* Hitting this error loop will stop the counter incrementing, allowing the check task to recognise an error. */ \
" debug \n" \
" j _task2_error_loop \n" \
"_task2_skip_error_loop: \n" );

Loading…
Cancel
Save