mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Add the death.c standard demo files to the TriCode demo.
This commit is contained in:
parent
70cfbda2e8
commit
0997b286bc
|
@ -562,6 +562,10 @@
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Source/portable/PLS/TriCore_1782_MPU}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Source/portable/PLS/TriCore_1782_MPU}""/>
|
||||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/RTOSDemo/FreeRTOS_Source/portable/GCC/TriCore_1782}""/>
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/RTOSDemo/FreeRTOS_Source/portable/GCC/TriCore_1782}""/>
|
||||||
</option>
|
</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"/>
|
<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>
|
||||||
<tool id="com.rt.hightec.buildsystem.tricore.new.compiler.cpp.820930352" name="TriCore C++ Compiler" superClass="com.rt.hightec.buildsystem.tricore.new.compiler.cpp">
|
<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>
|
</option>
|
||||||
</tool>
|
</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">
|
<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">
|
<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=""RTOSDemo\Common_Demo_Source\BlockQ.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\GenQTest.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\PollQ.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\QPeek.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\TimerDemo.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\blocktim.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\comtest.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\countsem.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\death.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\dynamic.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\flash.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\flop.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\integer.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\recmutex.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\Common_Demo_Source\semtest.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\FreeRTOS_Source\list.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\FreeRTOS_Source\portable\GCC\TriCore_1782\MPU_Wrappers.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\FreeRTOS_Source\portable\GCC\TriCore_1782\port.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\FreeRTOS_Source\portable\GCC\TriCore_1782\porttrap.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\FreeRTOS_Source\portable\MemMang\heap_2.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\FreeRTOS_Source\queue.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\FreeRTOS_Source\tasks.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\FreeRTOS_Source\timers.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\ParTest.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\ThirdPartyCode\cpufreq.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\main.o""/>
|
|
||||||
<listOptionValue builtIn="false" value=""RTOSDemo\serial.o""/>
|
|
||||||
</option>
|
|
||||||
<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=""..\ld\iRAM.ld"" valueType="string"/>
|
<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=""..\ld\iRAM.ld"" 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>
|
||||||
<tool id="com.rt.hightec.buildsystem.tricore.new.linker.cpp.2086148347" name="TriCore C++ Linker" superClass="com.rt.hightec.buildsystem.tricore.new.linker.cpp">
|
<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"" valueType="string"/>
|
<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"" valueType="string"/>
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -113,7 +113,5 @@
|
||||||
|
|
||||||
#define BLOCKQ_1 0
|
#define BLOCKQ_1 0
|
||||||
|
|
||||||
#define portCLEANUP_TCB( pxTCB ) vPortReclaimCSA( ( unsigned portBASE_TYPE *) ( pxTCB ) )
|
|
||||||
|
|
||||||
#endif /* FREERTOS_CONFIG_H */
|
#endif /* FREERTOS_CONFIG_H */
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,7 @@
|
||||||
#include "GenQTest.h"
|
#include "GenQTest.h"
|
||||||
#include "recmutex.h"
|
#include "recmutex.h"
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
|
#include "death.h"
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Constants for the ComTest tasks. */
|
/* Constants for the ComTest tasks. */
|
||||||
|
@ -91,6 +92,7 @@
|
||||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
|
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
|
||||||
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||||
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
#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
|
/* The rate at which the on board LED will toggle when there is/is not an
|
||||||
error. */
|
error. */
|
||||||
|
@ -168,7 +170,9 @@ int main( void )
|
||||||
/* Start the check task - which is defined in this file. */
|
/* Start the check task - which is defined in this file. */
|
||||||
xTaskCreate( prvCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
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. */
|
/* Now all the tasks have been started - start the scheduler. */
|
||||||
vTaskStartScheduler();
|
vTaskStartScheduler();
|
||||||
|
@ -280,6 +284,11 @@ long lReturn = pdPASS;
|
||||||
lReturn = pdFAIL;
|
lReturn = pdFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( xIsCreateTaskStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
lReturn = pdFAIL;
|
||||||
|
}
|
||||||
|
|
||||||
return lReturn;
|
return lReturn;
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -459,7 +468,7 @@ static void prvRegTask1( void *pvParameters )
|
||||||
/* Load the parameter address from the stack and modify the value. */
|
/* Load the parameter address from the stack and modify the value. */
|
||||||
__asm volatile( \
|
__asm volatile( \
|
||||||
" ld.w %d1, [%sp]4 \n" \
|
" ld.w %d1, [%sp]4 \n" \
|
||||||
" add %d1, %d15, 1 \n" \
|
" add %d1, 1 \n" \
|
||||||
" st.w [%sp]4, %d1 \n" \
|
" st.w [%sp]4, %d1 \n" \
|
||||||
" ld.a %a15, [%sp] \n" \
|
" ld.a %a15, [%sp] \n" \
|
||||||
" st.w [%a15], %d1 \n" \
|
" st.w [%a15], %d1 \n" \
|
||||||
|
@ -504,11 +513,10 @@ static void prvRegTask2( void *pvParameters )
|
||||||
" mov.a %a12, 4 \n" \
|
" mov.a %a12, 4 \n" \
|
||||||
" mov.a %a13, 3 \n" \
|
" mov.a %a13, 3 \n" \
|
||||||
" mov.a %a14, 2 \n" );
|
" mov.a %a14, 2 \n" );
|
||||||
/* Yield to force a context switch. */
|
|
||||||
taskYIELD();
|
|
||||||
|
|
||||||
/* Check the values of the registers. */
|
/* Check the values of the registers. */
|
||||||
__asm volatile( " _task2_loop: \n" \
|
__asm volatile( " _task2_loop: \n" \
|
||||||
|
" syscall 0 \n" \
|
||||||
" eq %d1, %d0, 7 \n" \
|
" eq %d1, %d0, 7 \n" \
|
||||||
" jne %d1, 1, _task2_error_loop \n" \
|
" jne %d1, 1, _task2_error_loop \n" \
|
||||||
" eq %d1, %d1, 1 \n" \
|
" eq %d1, %d1, 1 \n" \
|
||||||
|
@ -561,6 +569,7 @@ static void prvRegTask2( void *pvParameters )
|
||||||
" jne.a %a15, %a14, _task2_error_loop \n" \
|
" jne.a %a15, %a14, _task2_error_loop \n" \
|
||||||
" j _task2_skip_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. */ \
|
"_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" \
|
" j _task2_error_loop \n" \
|
||||||
"_task2_skip_error_loop: \n" );
|
"_task2_skip_error_loop: \n" );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue