Added IntQueue demo/test to the RX demo.

pull/4/head
Richard Barry 15 years ago
parent 27683e7360
commit cc7c4acf02

@ -7,21 +7,23 @@
[GENERAL_DATA]
[BREAKPOINTS]
[OPEN_WORKSPACE_FILES]
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\FreeRTOSConfig.h"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\intprg.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\include\iodefine.h"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\IntQueueTimer.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\main.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\resetprg.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\portmacro.h"
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c"
[WORKSPACE_FILE_STATES]
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\FreeRTOSConfig.h" 44 44 1192 368 0 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\intprg.c" 88 88 878 368 0 6
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\main.c" 0 0 976 339 0 3
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\resetprg.c" 44 44 878 368 0 4
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c" 0 0 1062 571 0 7
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" -4 -23 1062 571 1 5
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\FreeRTOSConfig.h" 0 0 1062 571 0 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\IntQueueTimer.c" 0 0 1062 571 0 6
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\include\iodefine.h" 176 176 878 368 0 8
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\main.c" 0 0 1062 571 0 3
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\resetprg.c" 154 154 878 368 0 7
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c" 0 0 1062 571 0 4
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\portmacro.h" 0 0 1062 571 0 1
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" 66 66 878 368 0 5
[LOADED_PROJECTS]
"RTOSDemo"
[END]

@ -0,0 +1,137 @@
/*
FreeRTOS V6.0.5 - Copyright (C) 2010 Real Time Engineers Ltd.
***************************************************************************
* *
* If you are: *
* *
* + New to FreeRTOS, *
* + Wanting to learn FreeRTOS or multitasking in general quickly *
* + Looking for basic training, *
* + Wanting to improve your FreeRTOS skills and productivity *
* *
* then take a look at the FreeRTOS eBook *
* *
* "Using the FreeRTOS Real Time Kernel - a Practical Guide" *
* http://www.FreeRTOS.org/Documentation *
* *
* A pdf reference manual is also available. Both are usually delivered *
* to your inbox within 20 minutes to two hours when purchased between 8am *
* and 8pm GMT (although please allow up to 24 hours in case of *
* exceptional circumstances). Thank you for your support! *
* *
***************************************************************************
This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
***NOTE*** The exception to the GPL is included to allow you to distribute
a combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
1 tab == 4 spaces!
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/* Scheduler includes. */
#include "FreeRTOS.h"
#include "task.h"
/* Demo includes. */
#include "IntQueueTimer.h"
#include "IntQueue.h"
/* Hardware specifics. */
#include "iodefine.h"
#define tmrTIMER_0_1_FREQUENCY ( 2000UL )
#define tmrTIMER_2_3_FREQUENCY ( 2001UL )
void vInitialiseTimerForIntQueueTest( void )
{
/* Ensure interrupts do not start until full configuration is complete. */
portENTER_CRITICAL();
{
/* Cascade two 8bit timer channels to generate the interrupts.
8bit timer unit 1 (TMR0 and TMR1) and 8bit timer unit 2 (TMR2 and TMR3 are
utilised for this test. */
/* Enable the timers. */
SYSTEM.MSTPCRA.BIT.MSTPA5 = 0;
SYSTEM.MSTPCRA.BIT.MSTPA4 = 0;
/* Enable compare match A interrupt request. */
TMR0.TCR.BIT.CMIEA = 1;
TMR2.TCR.BIT.CMIEA = 1;
/* Clear the timer on compare match A. */
TMR0.TCR.BIT.CCLR = 1;
TMR2.TCR.BIT.CCLR = 1;
/* Set the compare match value. */
TMR01.TCORA = ( unsigned short ) ( ( ( configCPU_CLOCK_HZ / tmrTIMER_0_1_FREQUENCY ) -1 ) / 8 );
TMR23.TCORA = ( unsigned short ) ( ( ( configCPU_CLOCK_HZ / tmrTIMER_0_1_FREQUENCY ) -1 ) / 8 );
/* 16 bit operation ( count from timer 1,2 ). */
TMR0.TCCR.BIT.CSS = 3;
TMR2.TCCR.BIT.CSS = 3;
/* Use PCLK as the input. */
TMR1.TCCR.BIT.CSS = 1;
TMR3.TCCR.BIT.CSS = 1;
/* Divide PCLK by 8. */
TMR1.TCCR.BIT.CKS = 2;
TMR3.TCCR.BIT.CKS = 2;
/* Enable TMR 0, 2 interrupts. */
IEN( TMR0, CMIA0 ) = 1;
IEN( TMR2, CMIA2 ) = 1;
/* Set the timer interrupts to be above the kernel. The interrupts are
assigned different priorities so they nest with each other. */
IPR( TMR0, CMIA0 ) = configMAX_SYSCALL_INTERRUPT_PRIORITY;
IPR( TMR2, CMIA2 ) = ( configMAX_SYSCALL_INTERRUPT_PRIORITY - 1 );
}
portEXIT_CRITICAL();
/* Ensure the interrupts are clear as they are edge detected. */
IR( TMR0, CMIA0 ) = 0;
IR( TMR2, CMIA2 ) = 0;
}
/*-----------------------------------------------------------*/
#pragma interrupt ( vT0_1InterruptHandler( vect = VECT_TMR0_CMIA0, enable ) )
void vT0_1InterruptHandler( void )
{
portYIELD_FROM_ISR( xFirstTimerHandler() );
}
/*-----------------------------------------------------------*/
#pragma interrupt ( vT2_3InterruptHandler( vect = VECT_TMR2_CMIA2, enable ) )
void vT2_3InterruptHandler( void )
{
portYIELD_FROM_ISR( xSecondTimerHandler() );
}

@ -118,6 +118,9 @@
"Object file" "Renesas OptLinker" "Renesas RX Assembler"
"Object file" "Renesas OptLinker" "Renesas RX C/C++ Compiler"
[PROJECT_FILES]
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" "User" "C source file|Common demo tasks" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash.c" "User" "C source file|Common demo tasks" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\IntQueueTimer.c" "User" "C source file" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\ParTest.c" "User" "C source file" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\dbsct.c" "User" "C source file|Renesas Files" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\hwsetup.c" "User" "C source file|Renesas Files" 2
@ -133,6 +136,7 @@
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "User" "C source file|FreeRTOS" 2
[FOLDER]
"C source file" "C source file"
"C source file|Common demo tasks" ""
"C source file|FreeRTOS" ""
"C source file|FreeRTOS|Portable layer" ""
"C source file|Renesas Files" ""
@ -148,13 +152,16 @@
[GENERAL_DATA_SESSION_SessionRX600_E1_E20_SYSTEM]
[GENERAL_DATA_SESSION_SimSessionRX600]
[OPTIONS_Debug_Renesas OptLinker]
"Single Shot" "0621fb78d2d3bc10" 5
"Single Shot" "0940cc328df3bc10" 5
[OPTIONS_Debug_Renesas RX Assembler]
"Assembly source file" "088b30f0a993bc10" 4
"Linkage symbol file" "088b30f0a993bc10" 4
[OPTIONS_Debug_Renesas RX C/C++ Compiler]
"C source file" "067b2354f2d3bc10" 2
"C++ source file" "067b2354f2d3bc10" 3
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" "090dfce07df3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash.c" "02b798669af3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\IntQueueTimer.c" "0a762c328df3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\ParTest.c" "067b2354f2d3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\dbsct.c" "067b2354f2d3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\hwsetup.c" "067b2354f2d3bc10" 2
@ -171,7 +178,7 @@
[OPTIONS_Debug_Renesas RX C/C++ Library Generator]
"Single Shot" "09a8e74281a3bc10" 1
[OPTIONS_Debug_Renesas RX Configurator]
"Single Shot" "08d08b78d2d3bc10" 6
"Single Shot" "0a762c328df3bc10" 6
[OPTIONS_Debug]
"" 0
"[V|VERSION|1] [B|COMMAND|1] [S|SPEC|UITRON4] [S|OUTPUTPATH|^"$(CONFIGDIR)^"] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|FINT_REGISTER|0]" 6
@ -189,13 +196,16 @@
[LINKAGE_ORDER_Debug]
[GENERAL_DATA_CONFIGURATION_Debug]
[OPTIONS_Debug_RX600_E1_E20_SYSTEM_Renesas OptLinker]
"Single Shot" "0621fb78d2d3bc10" 4
"Single Shot" "0940cc328df3bc10" 4
[OPTIONS_Debug_RX600_E1_E20_SYSTEM_Renesas RX Assembler]
"Assembly source file" "0cb120ca4793bc10" 3
"Linkage symbol file" "0cb120ca4793bc10" 3
[OPTIONS_Debug_RX600_E1_E20_SYSTEM_Renesas RX C/C++ Compiler]
"C source file" "0cb120ca4793bc10" 2
"C++ source file" "0cb120ca4793bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" "090dfce07df3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash.c" "02b798669af3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\IntQueueTimer.c" "0a762c328df3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\ParTest.c" "08d08b78d2d3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\dbsct.c" "0cb120ca4793bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\hwsetup.c" "0800ee5c7da3bc10" 2
@ -212,7 +222,7 @@
[OPTIONS_Debug_RX600_E1_E20_SYSTEM_Renesas RX C/C++ Library Generator]
"Single Shot" "0cb120ca4793bc10" 1
[OPTIONS_Debug_RX600_E1_E20_SYSTEM_Renesas RX Configurator]
"Single Shot" "08d08b78d2d3bc10" 5
"Single Shot" "0a762c328df3bc10" 5
[OPTIONS_Debug_RX600_E1_E20_SYSTEM]
"" 0
"[S|OUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [V|VERSION|1] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|ROUND|NEAREST] [S|DBL_SIZE|4] [B|SIGNED_CHAR|0] [B|SIGNED_BITFIELD|0] [S|BIT_ORDER|RIGHT] [S|FINT_REGISTER|0] [S|BRANCH|24] [S|LANG|C] [B|RUNTIME|1] [B|CTYPE|0] [B|MATH|0] [B|MATHF|0] [B|STDARG|0] [B|STDIO|0] [B|STDLIB|0] [B|STRING|0] [B|IOS|0] [B|NEW|1] [B|COMPLEX|0] [B|CPPSTRING|0] [S|MODE|BUILD/CHANGED]" 1
@ -224,13 +234,16 @@
[LINKAGE_ORDER_Debug_RX600_E1_E20_SYSTEM]
[GENERAL_DATA_CONFIGURATION_Debug_RX600_E1_E20_SYSTEM]
[OPTIONS_Release_Renesas OptLinker]
"Single Shot" "0621fb78d2d3bc10" 4
"Single Shot" "0940cc328df3bc10" 4
[OPTIONS_Release_Renesas RX Assembler]
"Assembly source file" "0cb120ca4793bc10" 3
"Linkage symbol file" "0cb120ca4793bc10" 3
[OPTIONS_Release_Renesas RX C/C++ Compiler]
"C source file" "0cb120ca4793bc10" 2
"C++ source file" "0cb120ca4793bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" "090dfce07df3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash.c" "02b798669af3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\IntQueueTimer.c" "0a762c328df3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\ParTest.c" "08d08b78d2d3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\dbsct.c" "0cb120ca4793bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\hwsetup.c" "0800ee5c7da3bc10" 2
@ -247,7 +260,7 @@
[OPTIONS_Release_Renesas RX C/C++ Library Generator]
"Single Shot" "0cb120ca4793bc10" 1
[OPTIONS_Release_Renesas RX Configurator]
"Single Shot" "08d08b78d2d3bc10" 5
"Single Shot" "0a762c328df3bc10" 5
[OPTIONS_Release]
"" 0
"[S|OUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [V|VERSION|1] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|ROUND|NEAREST] [S|DBL_SIZE|4] [B|SIGNED_CHAR|0] [B|SIGNED_BITFIELD|0] [S|BIT_ORDER|RIGHT] [S|FINT_REGISTER|0] [S|BRANCH|24] [S|LANG|C] [B|RUNTIME|1] [B|CTYPE|0] [B|MATH|0] [B|MATHF|0] [B|STDARG|0] [B|STDIO|0] [B|STDLIB|0] [B|STRING|0] [B|IOS|0] [B|NEW|1] [B|COMPLEX|0] [B|CPPSTRING|0] [S|MODE|BUILD/CHANGED]" 1
@ -259,13 +272,16 @@
[LINKAGE_ORDER_Release]
[GENERAL_DATA_CONFIGURATION_Release]
[OPTIONS_SimDebug_RX600_Renesas OptLinker]
"Single Shot" "0621fb78d2d3bc10" 4
"Single Shot" "0940cc328df3bc10" 4
[OPTIONS_SimDebug_RX600_Renesas RX Assembler]
"Assembly source file" "0cb120ca4793bc10" 3
"Linkage symbol file" "0cb120ca4793bc10" 3
[OPTIONS_SimDebug_RX600_Renesas RX C/C++ Compiler]
"C source file" "0cb120ca4793bc10" 2
"C++ source file" "0cb120ca4793bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c" "090dfce07df3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash.c" "02b798669af3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\IntQueueTimer.c" "0a762c328df3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\ParTest.c" "08d08b78d2d3bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\dbsct.c" "0cb120ca4793bc10" 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\hwsetup.c" "0800ee5c7da3bc10" 2
@ -282,7 +298,7 @@
[OPTIONS_SimDebug_RX600_Renesas RX C/C++ Library Generator]
"Single Shot" "0cb120ca4793bc10" 1
[OPTIONS_SimDebug_RX600_Renesas RX Configurator]
"Single Shot" "08d08b78d2d3bc10" 5
"Single Shot" "0a762c328df3bc10" 5
[OPTIONS_SimDebug_RX600]
"" 0
"[S|OUTPUTPATH|^"$(CONFIGDIR)\$(PROJECTNAME).lib^"] [V|VERSION|1] [S|CPU|RX600] [S|ENDIAN|LITTLE] [S|ROUND|NEAREST] [S|DBL_SIZE|4] [B|SIGNED_CHAR|0] [B|SIGNED_BITFIELD|0] [S|BIT_ORDER|RIGHT] [S|FINT_REGISTER|0] [S|BRANCH|24] [S|LANG|C] [B|RUNTIME|1] [B|CTYPE|0] [B|MATH|0] [B|MATHF|0] [B|STDARG|0] [B|STDIO|0] [B|STDLIB|0] [B|STRING|0] [B|IOS|0] [B|NEW|1] [B|COMPLEX|0] [B|CPPSTRING|0] [S|MODE|BUILD/CHANGED]" 1

@ -8,7 +8,7 @@
""
[GENERAL_DATA]
"FIRST_CONNECTION_TAG" "NO"
"MRULABELS_DATAMANAGER_KEY" "88204|FFFFFFFF|00000000|88208|18b8"
"MRULABELS_DATAMANAGER_KEY" "FFFFFFFF|00000000|88218|000870B4|000870AE|88204|88208|18b8"
"RESET_CPU_AFTER_DOWNLOAD_TAG" "VARIANT_TRUE_STORE_TAG"
"{228DB593-0AB2-4EBE-A098-A2CABF094E46}RamMonitorCtrlViews" "0"
"{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlECX_MAP_FIND_SYMBOL_LIST" ""
@ -30,7 +30,7 @@
"{313F4FC1-6566-11D5-8BBE-0004E2013C71}TclTkCtrlLogFileName" ""
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_COMPARE_END_ADDRESS" ""
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_COMPARE_START_ADDRESS" ""
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_DEST_ADDRESS" "88208"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_DEST_ADDRESS" "88218"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_END_ADDRESS" "FFFFFFFF"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_START_ADDRESS" "00000000"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_FILL_END_ADDRESS" ""
@ -39,14 +39,14 @@
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_MOVE_START_ADDRESS" ""
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_SEARCH_END_ADDRESS" ""
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_SEARCH_START_ADDRESS" ""
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_SET_DEST_ADDRESS" ""
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_SET_DEST_ADDRESS" "000870B4"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_TEST_END_ADDRESS" ""
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_TEST_START_ADDRESS" ""
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryCtrlViews" "0"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0AutoRefreshEnableTopPane" "0"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0AutoRefreshIntervalTopPane" "100"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0DataLength" "1"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0DispAddressTopPane" "557572"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0DispAddressTopPane" "553134"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0DispCode" "42208"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0DispColumnCount" "16"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewA0IsDispCode" "1"
@ -65,7 +65,7 @@
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0AutoRefreshEnableTopPane" "0"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0AutoRefreshIntervalTopPane" "100"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0DataLength" "1"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0DispAddressTopPane" "557576"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0DispAddressTopPane" "553134"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0DispCode" "42208"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0DispColumnCount" "16"
"{313F4FC2-6566-11D5-8BBE-0004E2013C71}MemoryWndViewB0IsDispCode" "1"
@ -89,28 +89,28 @@
"{5F75FDA0-6FF0-11D5-B7CE-00E029352378}PACtrlViews" "0"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_DENORMAL_MODE" "16777216"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_ROUND_MODE" "768"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000001618"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000003318"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "00000000000872E0"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "00000000AAAAAAAA"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "00000000BBBBBBBB"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "00000000CCCCCCCC"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "00000000DDDDDDDD"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "00000000EEEEEEEE"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "00000000FFFFFFFF"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000001618"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "000000000000AB74"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000003318"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "000000000000AD6C"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000030000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFFF91AB"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000022222222"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFFF84A8"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFFF9E17"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "00000000000030A4"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFFF84D0"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_22" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_23" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_24" "0000000000000100"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_25" "1234567887650000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000033333333"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000044444444"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000055555555"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000001"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000066666666"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000077777777"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "0000000088888888"
@ -153,8 +153,33 @@
"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_SAMPLEING_RATE" "1000"
"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ECX_IMAGE_VIEW" "0,0,0,0,0,0"
"{AC411480-6F0A-11D5-8EB6-00004CC34E9D}ImageCtrlViews" "0"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchCtrlViews" "0"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchCtrlViews" "4"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth0" "120"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth1" "150"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth12" "200"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth2" "120"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth3" "200"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "0"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "200"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth2" "120"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth3" "200"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ECX_WATCH_ITEMCnt" "0"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth0" "120"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth1" "150"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth12" "200"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth2" "120"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ColWidth3" "200"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd2ECX_WATCH_ITEMCnt" "0"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth0" "120"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth1" "150"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth12" "200"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth2" "120"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ColWidth3" "200"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd3ECX_WATCH_ITEMCnt" "0"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndInitial_Radix" "0"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndInstanceKey0" "{WK_00000001_WATCH}RTOSDemoSessionRX600_E1_E20_SYSTEM"
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndRecentFile_WatchRecord" ""
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndRecentFile_WatchSave" ""
"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWndUpdate_Interval" "100"
@ -195,12 +220,13 @@
0
[WINDOW_POSITION_STATE_DATA_VD1]
"Help" "TOOLBAR 0" 59419 1 5 "0.00" 0 0 0 0 0 17 0 "" "0.0"
"{WK_00000001_CmdLine}" "WINDOW" 59422 0 1 "0.07" 289 0 0 100 100 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>" "0.0"
"{WK_00000001_CmdLine}" "WINDOW" 59422 0 2 "0.07" 289 0 0 100 100 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>" "0.0"
"{WK_00000001_DEBUGCONSOLE}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 1 "1.00" 307 0 0 350 200 17 0 "57634|57637|57633|<<separator>>|32781|32782|<<separator>>|32780|32785|32787" "0.0"
"{WK_00000001_DISASSEMBLY}" "WINDOW" 0 0 0 "0.00" 0 -4 -23 1062 571 10 0 "" "0.0"
"{WK_00000001_MEMORY}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 0 "0.61" 289 0 0 350 200 2065 0 "42202|42203|42204|42233|<<separator>>|42206|42205|42230|42229|42207|<<separator>>|42208|42209|42210|49076|42228|42227|<<separator>>|42231|42232|42234|42235|<<separator>>|42211|<<separator>>" "0.0"
"{WK_00000001_DISASSEMBLY}" "WINDOW" 0 0 0 "0.00" 0 0 0 1062 571 10 0 "" "0.0"
"{WK_00000001_MEMORY}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 0 "0.64" 289 0 0 350 200 2065 0 "42202|42203|42204|42233|<<separator>>|42206|42205|42230|42229|42207|<<separator>>|42208|42209|42210|49076|42228|42227|<<separator>>|42231|42232|42234|42235|<<separator>>|42211|<<separator>>" "0.0"
"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 289 560 340 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0"
"{WK_00000001_REGISTERS}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 0 "1.00" 307 0 0 350 200 18 0 "" "0.0"
"{WK_00000001_WATCH}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 1 "0.39" 289 0 0 853 610 17 0 "32781|32783|<<separator>>|32771|32829|32772|32827|32773|<<separator>>|32786|<<separator>>|32810|32811" "0.0"
"{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 280 560 340 350 200 18 0 "" "0.0"
"{WK_TB00000001_STANDARD}" "TOOLBAR 0" 59419 0 2 "0.00" 0 0 0 0 0 18 0 "" "0.0"
"{WK_TB00000002_EDITOR}" "TOOLBAR 0" 59419 0 0 "0.00" 0 0 0 0 0 18 0 "" "0.0"
@ -227,14 +253,15 @@
[WINDOW_POSITION_STATE_DATA_VD3]
[WINDOW_POSITION_STATE_DATA_VD4]
[WINDOW_Z_ORDER]
"C:\Documents and Settings\barryri\Disassembly"
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\resetprg.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\IntQueue.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\main.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\intprg.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\portmacro.h"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\resetprg.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\IntQueueTimer.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\include\iodefine.h"
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\port.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX62N_Renesas\RTOSDemo\FreeRTOSConfig.h"
"C:\Documents and Settings\barryri\Disassembly"
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\RX600\portmacro.h"
[TARGET_NAME]
"RX600 E1/E20 SYSTEM" "" 0
[STATUSBAR_STATEINFO_VD1]
@ -286,6 +313,4 @@
[FLASH_DETAILS]
"" 0 0 "" 0 "" 0 0 "" 0 0 0 0 0 0 0 "" "" "" "" ""
[BREAKPOINTS]
"c:\e\dev\freertos\workingcopy\source\portable\renesas\rx600\port.c" 237 -27128 1 "{00000000-0000-0000-C000-000000000046}" ""
"" -1 -27036 1 "{110BABEB-6DCB-4265-8236-8888EECAB6AB}" ""
[END]

@ -0,0 +1,62 @@
/*
FreeRTOS V6.0.5 - Copyright (C) 2010 Real Time Engineers Ltd.
***************************************************************************
* *
* If you are: *
* *
* + New to FreeRTOS, *
* + Wanting to learn FreeRTOS or multitasking in general quickly *
* + Looking for basic training, *
* + Wanting to improve your FreeRTOS skills and productivity *
* *
* then take a look at the FreeRTOS eBook *
* *
* "Using the FreeRTOS Real Time Kernel - a Practical Guide" *
* http://www.FreeRTOS.org/Documentation *
* *
* A pdf reference manual is also available. Both are usually delivered *
* to your inbox within 20 minutes to two hours when purchased between 8am *
* and 8pm GMT (although please allow up to 24 hours in case of *
* exceptional circumstances). Thank you for your support! *
* *
***************************************************************************
This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
***NOTE*** The exception to the GPL is included to allow you to distribute
a combined work that includes FreeRTOS without being obliged to provide the
source code for proprietary components outside of the FreeRTOS kernel.
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
1 tab == 4 spaces!
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef INT_QUEUE_TIMER_H
#define INT_QUEUE_TIMER_H
void vInitialiseTimerForIntQueueTest( void );
portBASE_TYPE xTimer0Handler( void );
portBASE_TYPE xTimer1Handler( void );
#endif

@ -65,6 +65,31 @@
#include "FreeRTOS.h"
#include "task.h"
/* Standard demo includes. */
#include "partest.h"
#include "flash.h"
#include "IntQueue.h"
/* Values that are passed into the reg test tasks using the task parameter. The
tasks then check that the values are passed in correctly. */
#define mainREG_TEST_1_PARAMETER ( 0x12121212UL )
#define mainREG_TEST_2_PARAMETER ( 0x12345678UL )
/* Priorities at which the tasks are created. */
#define mainFLASH_TASK_PRIORITY 1
#define mainCHECK_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
/* The LED toggled by the check task. */
#define mainCHECK_LED ( 5 )
/* The rate at which mainCHECK_LED will toggle when all the tasks are running
without error. */
#define mainNO_ERROR_CYCLE_TIME ( 5000 / portTICK_RATE_MS )
/* The rate at which mainCHECK_LED will toggle when an error has been reported
by at least one task. */
#define mainERROR_CYCLE_TIME ( 200 / portTICK_RATE_MS )
/*
* vApplicationMallocFailedHook() will only be called if
* configUSE_MALLOC_FAILED_HOOK is set to 1 in FreeRTOSConfig.h. It is a hook
@ -103,6 +128,23 @@ void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName
void vRegTest1Task( void *pvParameters );
void vRegTest2Task( void *pvParameters );
/*
* The actual implementatio of the reg test functionality, which, because of
* the direct register access, have to be in assembly.
*/
static void prvRegTest1Implementation( void );
static void prvRegTest2Implementation( void );
/*
* The check task as described at the top of this file.
*/
static void prvCheckTask( void *pvParameters );
/* Variables that are incremented on each iteration of the reg test tasks -
provided the tasks have not reported any errors. The check task inspects these
variables to ensure they are still incrementing as expected. */
unsigned long ulRegTest1CycleCount = 0UL, ulRegTest2CycleCount = 0UL;
/*-----------------------------------------------------------*/
void main(void)
@ -116,9 +158,16 @@ extern void HardwareSetup( void );
/* Turn all LEDs off. */
vParTestInitialise();
/* Start the common demo tasks. */
vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY );
vStartInterruptQueueTasks();
/* Start the reg test tasks which test the context switching mechanism. */
xTaskCreate( vRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( vRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
xTaskCreate( vRegTest1Task, "RegTst1", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_1_PARAMETER, tskIDLE_PRIORITY, NULL );
xTaskCreate( vRegTest2Task, "RegTst2", configMINIMAL_STACK_SIZE, ( void * ) mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL );
/* Start the check task as described at the top of this file. */
xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
/* Start the tasks running. */
vTaskStartScheduler();
@ -130,6 +179,48 @@ extern void HardwareSetup( void );
}
/*-----------------------------------------------------------*/
static void prvCheckTask( void *pvParameters )
{
static volatile unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;
portTickType xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;
/* Initialise xNextWakeTime - this only needs to be done once. */
xNextWakeTime = xTaskGetTickCount();
for( ;; )
{
/* Place this task in the blocked state until it is time to run again. */
vTaskDelayUntil( &xNextWakeTime, xCycleFrequency );
/* Check the standard demo tasks are running without error. */
if( xAreIntQueueTasksStillRunning() != pdPASS )
{
xCycleFrequency = mainERROR_CYCLE_TIME;
}
/* Check the reg test tasks are still cycling. They will stop incrementing
their loop counters if they encounter an error. */
if( ulRegTest1CycleCount == ulLastRegTest1CycleCount )
{
xCycleFrequency = mainERROR_CYCLE_TIME;
}
if( ulRegTest2CycleCount == ulLastRegTest2CycleCount )
{
xCycleFrequency = mainERROR_CYCLE_TIME;
}
ulLastRegTest1CycleCount = ulRegTest1CycleCount;
ulLastRegTest2CycleCount = ulRegTest2CycleCount;
/* Toggle the check LED to give an indication of the system status. If the
LED toggles every 5 seconds then everything is ok. A faster toggle indicates
an error. */
vParTestToggleLED( mainCHECK_LED );
}
}
/*-----------------------------------------------------------*/
void vApplicationSetupTimerInterrupt( void )
{
/* Enable compare match timer 0. */
@ -145,10 +236,10 @@ void vApplicationSetupTimerInterrupt( void )
CMT0.CMCR.BIT.CKS = 0;
/* Enable the interrupt... */
_IEN(_CMT0_CMI0) = 1;
_IEN( _CMT0_CMI0 ) = 1;
/* ...and set its priority to the application defined kernel priority. */
_IPR(_CMT0_CMI0) = configKERNEL_INTERRUPT_PRIORITY;
_IPR( _CMT0_CMI0 ) = configKERNEL_INTERRUPT_PRIORITY;
/* Start the timer. */
CMT.CMSTR0.BIT.STR0 = 1;
@ -175,32 +266,205 @@ void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName
of this file. */
void vApplicationIdleHook( void )
{
taskENTER_CRITICAL();
taskEXIT_CRITICAL();
}
/*-----------------------------------------------------------*/
void vRegTest1Task( void *pvParameters )
{
volatile unsigned long ul = 0;
for( ;; )
if( ( ( unsigned long ) pvParameters ) != mainREG_TEST_1_PARAMETER )
{
ul += 2;
ul -= 1;
/* The parameter did not contain the expected value. */
for( ;; )
{
/* Stop the tick interrupt so its obvious something has gone wrong. */
taskDISABLE_INTERRUPTS();
}
}
/* This is an inline asm function that never returns. */
prvRegTest1Implementation();
}
/*-----------------------------------------------------------*/
void vRegTest2Task( void *pvParameters )
{
volatile unsigned long ul = 0;
for( ;; )
if( ( ( unsigned long ) pvParameters ) != mainREG_TEST_2_PARAMETER )
{
ul += 4;
ul -= 2;
/* The parameter did not contain the expected value. */
for( ;; )
{
/* Stop the tick interrupt so its obvious something has gone wrong. */
taskDISABLE_INTERRUPTS();
}
}
/* This is an inline asm function that never returns. */
prvRegTest2Implementation();
}
/*-----------------------------------------------------------*/
#pragma inline_asm prvRegTest1Implementation
static void prvRegTest1Implementation( void )
{
; Put a known value in each register.
MOV.L #1, R1
MOV.L #2, R2
MOV.L #3, R3
MOV.L #4, R4
MOV.L #5, R5
MOV.L #6, R6
MOV.L #7, R7
MOV.L #8, R8
MOV.L #9, R9
MOV.L #10, R10
MOV.L #11, R11
MOV.L #12, R12
MOV.L #13, R13
MOV.L #14, R14
MOV.L #15, R15
; Loop, checking each itteration that each register still contains the
; expected value.
TestLoop1:
; Push the registers that are going to get clobbered.
PUSHM R14-R15
; Increment the loop counter to show this task is still getting CPU time.
MOV.L #_ulRegTest1CycleCount, R14
MOV.L [ R14 ], R15
ADD #1, R15
MOV.L R15, [ R14 ]
; Yield to extend the text coverage. Set the bit in the ITU SWINTR register.
MOV.L #1, R14
MOV.L #0872E0H, R15
MOV.B R14, [R15]
NOP
NOP
; Restore the clobbered registers.
POPM R14-R15
; Now compare each register to ensure it still contains the value that was
; set before this loop was entered.
CMP #1, R1
BNE RegTest2Error
CMP #2, R2
BNE RegTest2Error
CMP #3, R3
BNE RegTest2Error
CMP #4, R4
BNE RegTest2Error
CMP #5, R5
BNE RegTest2Error
CMP #6, R6
BNE RegTest2Error
CMP #7, R7
BNE RegTest2Error
CMP #8, R8
BNE RegTest2Error
CMP #9, R9
BNE RegTest2Error
CMP #10, R10
BNE RegTest2Error
CMP #11, R11
BNE RegTest2Error
CMP #12, R12
BNE RegTest2Error
CMP #13, R13
BNE RegTest2Error
CMP #14, R14
BNE RegTest2Error
CMP #15, R15
BNE RegTest2Error
; All comparisons passed, start a new itteratio of this loop.
BRA TestLoop1
RegTest1Error:
; A compare failed, something has gone wrong. Stop the tick and any other
; interrupts to make it obvious that things have halted.
CLRPSW I
BRA RegTest1Error
}
/*-----------------------------------------------------------*/
#pragma inline_asm prvRegTest2Implementation
static void prvRegTest2Implementation( void )
{
; Put a known value in each register.
MOV.L #10, R1
MOV.L #20, R2
MOV.L #30, R3
MOV.L #40, R4
MOV.L #50, R5
MOV.L #60, R6
MOV.L #70, R7
MOV.L #80, R8
MOV.L #90, R9
MOV.L #100, R10
MOV.L #110, R11
MOV.L #120, R12
MOV.L #130, R13
MOV.L #140, R14
MOV.L #150, R15
; Loop, checking on each itteration that each register still contains the
; expected value.
TestLoop2:
; Push the registers that are going to get clobbered.
PUSHM R14-R15
; Increment the loop counter to show this task is still getting CPU time.
MOV.L #_ulRegTest2CycleCount, R14
MOV.L [ R14 ], R15
ADD #1, R15
MOV.L R15, [ R14 ]
; Restore the clobbered registers.
POPM R14-R15
CMP #10, R1
BNE RegTest2Error
CMP #20, R2
BNE RegTest2Error
CMP #30, R3
BNE RegTest2Error
CMP #40, R4
BNE RegTest2Error
CMP #50, R5
BNE RegTest2Error
CMP #60, R6
BNE RegTest2Error
CMP #70, R7
BNE RegTest2Error
CMP #80, R8
BNE RegTest2Error
CMP #90, R9
BNE RegTest2Error
CMP #100, R10
BNE RegTest2Error
CMP #110, R11
BNE RegTest2Error
CMP #120, R12
BNE RegTest2Error
CMP #130, R13
BNE RegTest2Error
CMP #140, R14
BNE RegTest2Error
CMP #150, R15
BNE RegTest2Error
; All comparisons passed, start a new itteratio of this loop.
BRA TestLoop2
RegTest2Error:
; A compare failed, something went wrong. Stop the tick and any other
; interrupts to make it obvious that things have halted.
CLRPSW I
BRA RegTest2Error
}

Loading…
Cancel
Save