*/\r
\r
/*\r
- * This file defines the RegTest tasks as described at the top of main.c\r
+ * This file defines the assembler wrapper for the example interrupt that is\r
+ * defined in main.c. The wrapper is the interrupt entry point.\r
*/\r
\r
/* ISR_Support.h contains the definitions of portSAVE_CONTEXT() and\r
#endif /* YRPBRL78G13 */\r
\r
#ifdef YRDKRL78G14\r
- #define LED_INIT() PM4_bit.no1 = 0\r
#define LED_BIT ( P4_bit.no1 )\r
+ #define LED_INIT() PM4_bit.no1 = 0\r
#endif /* YRDKRL78G14 */\r
\r
#ifdef RSKRL78G1C\r
/* Remove compiler warning about xFreeHeapSpace being set but never used. */\r
( void ) xFreeHeapSpace;\r
}\r
-/*-----------------------------------------------------------*/\r
\r
-void vAssertCalled( void )\r
-{\r
-volatile unsigned long ul = 0;\r
\r
- taskENTER_CRITICAL();\r
- {\r
- /* Set ul to a non-zero value using the debugger to step out of this\r
- function. */\r
- while( ul == 0 )\r
- {\r
- __asm volatile( "NOP" );\r
- }\r
- }\r
- taskEXIT_CRITICAL();\r
-}\r
--- /dev/null
+; FreeRTOS V7.4.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+;\r
+; FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
+; http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+;\r
+; ***************************************************************************\r
+; * *\r
+; * FreeRTOS tutorial books are available in pdf and paperback. *\r
+; * Complete, revised, and edited pdf reference manuals are also *\r
+; * available. *\r
+; * *\r
+; * Purchasing FreeRTOS documentation will not only help you, by *\r
+; * ensuring you get running as quickly as possible and with an *\r
+; * in-depth knowledge of how to use FreeRTOS, it will also help *\r
+; * the FreeRTOS project to continue with its mission of providing *\r
+; * professional grade, cross platform, de facto standard solutions *\r
+; * for microcontrollers - completely free of charge! *\r
+; * *\r
+; * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *\r
+; * *\r
+; * Thank you for using FreeRTOS, and thank you for your support! *\r
+; * *\r
+; ***************************************************************************\r
+;\r
+;\r
+; This file is part of the FreeRTOS distribution.\r
+;\r
+; FreeRTOS is free software; you can redistribute it and/or modify it under\r
+; the terms of the GNU General Public License (version 2) as published by the\r
+; Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+;\r
+; >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
+; distribute a combined work that includes FreeRTOS without being obliged to\r
+; provide the source code for proprietary components outside of the FreeRTOS\r
+; kernel.\r
+;\r
+; FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\r
+; details. You should have received a copy of the GNU General Public License\r
+; and the FreeRTOS license exception along with FreeRTOS; if not itcan be\r
+; viewed here: http://www.freertos.org/a00114.html and also obtained by\r
+; writing to Real Time Engineers Ltd., contact details for whom are available\r
+; on the FreeRTOS WEB site.\r
+;\r
+; 1 tab == 4 spaces!\r
+;\r
+; ***************************************************************************\r
+; * *\r
+; * Having a problem? Start by reading the FAQ "My application does *\r
+; * not run, what could be wrong?" *\r
+; * *\r
+; * http://www.FreeRTOS.org/FAQHelp.html *\r
+; * *\r
+; ***************************************************************************\r
+;\r
+;\r
+; http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+; license and Real Time Engineers Ltd. contact details.\r
+;\r
+; http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+; including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
+; fully thread aware and reentrant UDP/IP stack.\r
+;\r
+; http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+; Integrity Systems, who sell the code with commercial support,\r
+; indemnification and middleware, under the OpenRTOS brand.\r
+;\r
+; http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+; engineered and independently SIL3 certified version for use in safety and\r
+; mission critical applications that require provable dependability.\r
+\r
+;*\r
+; * This file defines the assembler wrapper for the example interrupt that is\r
+; * defined in main.c. The wrapper is the interrupt entry point.\r
+; *\r
+\r
+; ISR_Support.h contains the definitions of portSAVE_CONTEXT() and\r
+; portRESTORE_CONTEXT().\r
+#include "ISR_Support.h"\r
+\r
+ PUBLIC vANExampleISR_ASM_Wrapper\r
+ EXTERN vAnExampleISR_C_Handler\r
+\r
+ RSEG CODE:CODE\r
+\r
+; *\r
+; * This demo does not include a functional interrupt service routine - so\r
+; * this dummy handler (which is not actually installed) is provided as an\r
+; * example of how an ISR that needs to cause a context switch needs to be\r
+; * implemented. ISRs that do not cause a context switch have no special\r
+; * requirements and can be written as per the compiler documentation.\r
+; *\r
+; * This assembly wrapper function calls the main handler, which is called\r
+; * vAnExampleISR_C_Handler(), and is implemented in main.c. See the\r
+; * documentation page for this demo on the FreeRTOS.org website for full\r
+; * instructions.\r
+; *\r
+; * NOTE: vANExampleISR_ASM_Wrapper needs to be installed into the relevant\r
+; * vector, an example of how to do this from an assembly file is locate at\r
+; * the bottom of this file.\r
+; *\r
+\r
+ vANExampleISR_ASM_Wrapper:\r
+\r
+; portSAVE_CONTEXT() must be the first thing called in the ASM\r
+; wrapper.\r
+ portSAVE_CONTEXT\r
+\r
+; Once the context has been saved the C handler can be called.\r
+ call !!vAnExampleISR_C_Handler\r
+\r
+; Finally the ISR must end with a call to portRESTORE_CONTEXT()\r
+; followed by a reti instruction to return from the interrupt to whichever\r
+; task is now the task selected to run (which may be different to the task\r
+; that was running before the interrupt started).\r
+ portRESTORE_CONTEXT\r
+ reti\r
+\r
+\r
+; The interrupt handler can be installed into the vector table in the same\r
+; assembly file.\r
+\r
+; Ensure the vector table segement is used.\r
+ COMMON INTVEC:CODE:ROOT(1)\r
+;\r
+; Place a pointer to the asm wrapper at the correct index into the vector\r
+; table. Note 56 is used is purely as an example. The correct vector\r
+; number for the interrupt being installed must be used.\r
+ ORG 58\r
+ DW vANExampleISR_ASM_Wrapper\r
+\r
+ END\r
+\r
#define INCLUDE_vTaskDelete 0\r
#define INCLUDE_vTaskCleanUpResources 0\r
#define INCLUDE_vTaskSuspend 1\r
-#define INCLUDE_vTaskDelayUntil 0\r
+#define INCLUDE_vTaskDelayUntil 1\r
#define INCLUDE_vTaskDelay 1\r
#define INCLUDE_xTaskGetIdleTaskHandle 0\r
#define INCLUDE_xTimerGetTimerDaemonTaskHandle 0\r
#endif /* YRPBRL78G13 */\r
\r
#ifdef YRDKRL78G14\r
- #define LED_BIT ( P1_bit.no0 )\r
- #define LED_INIT() P1 &= 0xFE; PM1 &= 0xFE\r
+ #define LED_BIT ( P4_bit.no1 )\r
+ #define LED_INIT() PM4_bit.no1 = 0\r
#endif /* YRDKRL78G14 */\r
\r
#ifdef RSKRL78G1C\r
</option>\r
<option>\r
<name>DebugRunToEnable</name>\r
- <state>0</state>\r
+ <state>1</state>\r
</option>\r
<option>\r
<name>DebugRunToName</name>\r
<option>\r
<name>GenCodeModel</name>\r
<version>0</version>\r
- <state>0</state>\r
+ <state>1</state>\r
</option>\r
<option>\r
<name>GenDataModel</name>\r
<version>0</version>\r
- <state>0</state>\r
+ <state>1</state>\r
</option>\r
<option>\r
<name>GenNearConstLocation</name>\r
</option>\r
<option>\r
<name>GenRTConfigPath</name>\r
- <state>$TOOLKIT_DIR$\LIB\dlrl78nn2n.h</state>\r
+ <state>$TOOLKIT_DIR$\LIB\dlrl78ff2n.h</state>\r
</option>\r
<option>\r
<name>GenRTLibraryPath</name>\r
- <state>$TOOLKIT_DIR$\LIB\dlrl78ff2n.r87</state>\r
+ <state>$TOOLKIT_DIR$\LIB\dlrl78nn2n.r87</state>\r
</option>\r
<option>\r
<name>GenHwSupport</name>\r
<option>\r
<name>AsmDefines</name>\r
<state></state>\r
- <state>__FAR_DATA_MODEL__</state>\r
+ <state>__NEAR_DATA_MODEL__</state>\r
</option>\r
<option>\r
<name>AsmPreprocOutput</name>\r
<file>\r
<name>$PROJ_DIR$\..\Common\Minimal\dynamic.c</name>\r
</file>\r
+ <file>\r
+ <name>$PROJ_DIR$\main_full.c</name>\r
+ </file>\r
<file>\r
<name>$PROJ_DIR$\..\Common\Minimal\PollQ.c</name>\r
</file>\r
</group>\r
+ <file>\r
+ <name>$PROJ_DIR$\ExampleISR.s87</name>\r
+ </file>\r
<file>\r
<name>$PROJ_DIR$\main.c</name>\r
</file>\r
+ <file>\r
+ <name>$PROJ_DIR$\main_blinky.c</name>\r
+ </file>\r
<file>\r
<name>$PROJ_DIR$\RegTest.s87</name>\r
</file>\r
;/*\r
; FreeRTOS V7.4.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
-; \r
+;\r
;\r
; ***************************************************************************\r
; * *\r
; Functions implemented in this file\r
;------------------------------------------------------------------------------\r
\r
- PUBLIC vRegTest1\r
- PUBLIC vRegTest2\r
+ PUBLIC vRegTest1Task\r
+ PUBLIC vRegTest2Task\r
\r
; Functions and variables used by this file\r
;------------------------------------------------------------------------------\r
;\r
;------------------------------------------------------------------------------\r
RSEG CODE:CODE\r
-vRegTest1:\r
+vRegTest1Task:\r
\r
; First fill the registers.\r
MOVW AX, #0x1122\r
MOVW DE, #0x5566\r
MOVW HL, #0x7788\r
MOV CS, #0x01\r
- \r
+\r
#if __DATA_MODEL__ == __DATA_MODEL_FAR__\r
\r
; ES is not saved or restored when using the near memory model so only\r
; test it when using the far model.\r
MOV ES, #0x02\r
- \r
+\r
#endif\r
\r
loop1:\r
\r
; Jump over the branch to vRegTestError() if the register contained the\r
; expected value - otherwise flag an error by executing vRegTestError().\r
- BR vRegTestError \r
+ BR vRegTestError\r
\r
; Repeat for all the registers.\r
MOVW AX, BC\r
CMPW AX, #0x3344\r
BZ +5\r
- BR vRegTestError \r
+ BR vRegTestError\r
MOVW AX, DE\r
CMPW AX, #0x5566\r
BZ +5\r
- BR vRegTestError \r
- MOVW AX, HL \r
+ BR vRegTestError\r
+ MOVW AX, HL\r
CMPW AX, #0x7788\r
BZ +5\r
BR vRegTestError\r
;\r
;------------------------------------------------------------------------------\r
RSEG CODE:CODE\r
-vRegTest2:\r
+vRegTest2Task:\r
\r
MOVW AX, #0x99aa\r
MOVW BC, #0xbbcc\r
\r
#if __DATA_MODEL__ == __DATA_MODEL_FAR__\r
\r
- MOV ES, #0x04 \r
+ MOV ES, #0x04\r
\r
#endif\r
\r
loop2:\r
CMPW AX, #0x99aa\r
BZ +5\r
- BR vRegTestError \r
+ BR vRegTestError\r
MOVW AX, BC\r
CMPW AX, #0xbbcc\r
BZ +5\r
- BR vRegTestError \r
+ BR vRegTestError\r
MOVW AX, DE\r
CMPW AX, #0xddee\r
BZ +5\r
- BR vRegTestError \r
- MOVW AX, HL \r
+ BR vRegTestError\r
+ MOVW AX, HL\r
CMPW AX, #0xff12\r
BZ +5\r
BR vRegTestError\r
mission critical applications that require provable dependability.\r
*/\r
\r
-/*\r
+/******************************************************************************\r
+ * This project provides two demo applications. A simple blinky style project,\r
+ * and a more comprehensive test and demo application. The\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting (defined in this file) is used to\r
+ * select between the two. The simply blinky demo is implemented and described\r
+ * in main_blinky.c. The more comprehensive test and demo application is\r
+ * implemented and described in main_full.c.\r
+ *\r
+ * This file implements the code that is not demo specific, including the\r
+ * hardware setup and FreeRTOS hook functions.\r
+ *\r
+ * This project does not provide an example of how to write an RTOS compatible\r
+ * interrupt service routine (other than the tick interrupt itself), so this\r
+ * file contains the function vAnExampleISR_C_Handler() as a dummy example (that\r
+ * is not actually installed) that can be used as a reference. Also see the\r
+ * file ExampleISR.s87, and the documentation page for this demo on the\r
+ * FreeRTOS.org website for full instructions.\r
*\r
* ENSURE TO READ THE DOCUMENTATION PAGE FOR THIS PORT AND DEMO APPLICATION ON\r
* THE http://www.FreeRTOS.org WEB SITE FOR FULL INFORMATION ON USING THIS DEMO\r
* APPLICATION, AND ITS ASSOCIATE FreeRTOS ARCHITECTURE PORT!\r
*\r
- *\r
- * main() creates the demo application tasks and timers, then starts the\r
- * scheduler.\r
- *\r
- * This demo is configured to run on the RL78/G13 Promotion Board, which is\r
- * fitted with a R5F100LEA microcontroller. The R5F100LEA contains a little\r
- * under 4K bytes of usable internal RAM. The RAM size restricts the number of\r
- * demo tasks that can be created, and the demo creates 13 tasks, 4 queues and\r
- * two timers. The RL78 range does however include parts with up to 32K bytes\r
- * of RAM (at the time of writing). Using FreeRTOS on such a part will allow an\r
- * application to make a more comprehensive use of FreeRTOS tasks, and other\r
- * FreeRTOS features.\r
- *\r
- * In addition to the standard demo tasks, the following tasks, tests and timers\r
- * are created within this file:\r
- *\r
- * "Reg test" tasks - These fill the registers with known values, then check\r
- * that each register still contains its expected value. Each task uses a\r
- * different set of values. The reg test tasks execute with a very low priority,\r
- * so get preempted very frequently. A register containing an unexpected value\r
- * is indicative of an error in the context switching mechanism.\r
- *\r
- * The "Demo" Timer and Callback Function:\r
- * The demo timer callback function does nothing more than increment a variable.\r
- * The period of the demo timer is set relative to the period of the check timer\r
- * (described below). This allows the check timer to know how many times the\r
- * demo timer callback function should execute between each execution of the\r
- * check timer callback function. The variable incremented in the demo timer\r
- * callback function is used to determine how many times the callback function\r
- * has executed.\r
- *\r
- * The "Check" Timer and Callback Function:\r
- * The check timer period is initially set to three seconds. The check timer\r
- * callback function checks that all the standard demo tasks, the reg test tasks,\r
- * and the demo timer are not only still executing, but are executing without\r
- * reporting any errors. If the check timer discovers that a task or timer has\r
- * stalled, or reported an error, then it changes its own period from the\r
- * initial three seconds, to just 200ms. The check timer callback function also\r
- * toggles the user LED each time it is called. This provides a visual\r
- * indication of the system status: If the LED toggles every three seconds,\r
- * then no issues have been discovered. If the LED toggles every 200ms, then an\r
- * issue has been discovered with at least one task.\r
- *\r
*/\r
\r
/* Scheduler include files. */\r
#include "FreeRTOS.h"\r
#include "task.h"\r
-#include "timers.h"\r
-\r
-/* Standard demo includes. */\r
-#include "dynamic.h"\r
-#include "PollQ.h"\r
-#include "blocktim.h"\r
+#include "semphr.h"\r
\r
/* Hardware includes. */\r
#include "port_iodefine.h"\r
#include "port_iodefine_ext.h"\r
#include "LED.h"\r
\r
-/* The period at which the check timer will expire, in ms, provided no errors\r
-have been reported by any of the standard demo tasks. ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
-\r
-/* The period at which the check timer will expire, in ms, if an error has been\r
-reported in one of the standard demo tasks, the check tasks, or the demo timer.\r
-ms are converted to the equivalent in ticks using the portTICK_RATE_MS\r
-constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
-\r
-/* These two definitions are used to set the period of the demo timer. The demo\r
-timer period is always relative to the check timer period, so the check timer\r
-can determine if the demo timer has expired the expected number of times between\r
-its own executions. */\r
-#define mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT ( 100UL )\r
-#define mainDEMO_TIMER_PERIOD_MS ( mainCHECK_TIMER_PERIOD_MS / mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT )\r
-\r
-/* A block time of zero simple means "don't block". */\r
-#define mainDONT_BLOCK ( 0U )\r
+/* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,\r
+or 0 to run the more comprehensive test and demo application. */\r
+#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1\r
\r
/*-----------------------------------------------------------*/\r
\r
/*\r
- * The 'check' timer callback function, as described at the top of this file.\r
- */\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
-\r
-/*\r
- * The 'demo' timer callback function, as described at the top of this file.\r
+ * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
+ * main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.\r
*/\r
-static void prvDemoTimerCallback( xTimerHandle xTimer );\r
+extern void main_blinky( void );\r
+extern void main_full( void );\r
\r
/*\r
* This function is called from the C startup routine to setup the processor -\r
*/\r
int __low_level_init(void);\r
\r
-/*\r
- * Functions that define the RegTest tasks, as described at the top of this file.\r
- */\r
-extern void vRegTest1( void *pvParameters );\r
-extern void vRegTest2( void *pvParameters );\r
-\r
+/* Prototypes for the standard FreeRTOS callback/hook functions implemented\r
+within this file. */\r
+void vApplicationMallocFailedHook( void );\r
+void vApplicationIdleHook( void );\r
+void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName );\r
+void vApplicationTickHook( void );\r
\r
/*-----------------------------------------------------------*/\r
\r
-/* Variables that are incremented on each cycle of the two reg tests to allow\r
-the check timer to know that they are still executing. */\r
-unsigned short usRegTest1LoopCounter = 0, usRegTest2LoopCounter;\r
-\r
-/* The check timer. This uses prvCheckTimerCallback() as its callback\r
-function. */\r
-static xTimerHandle xCheckTimer = NULL;\r
+/* This variable is not actually used, but provided to allow an example of how\r
+to write an ISR to be included in this file. */\r
+static xSemaphoreHandle xSemaphore = NULL;\r
\r
-/* The demo timer. This uses prvDemoTimerCallback() as its callback function. */\r
-static xTimerHandle xDemoTimer = NULL;\r
-\r
-/* This variable is incremented each time the demo timer expires. */\r
-static volatile unsigned long ulDemoSoftwareTimerCounter = 0UL;\r
-\r
-/* RL78/G13 Option Byte Definition. Watchdog disabled, LVI enabled, OCD interface\r
+/* RL78 Option Byte Definition. Watchdog disabled, LVI enabled, OCD interface\r
enabled. */\r
__root __far const unsigned char OptionByte[] @ 0x00C0 =\r
{\r
- 0x00U, 0xFFU, 0xF8U, 0x81U\r
+ 0x6eU, 0xffU, 0xe8U, 0x85U\r
};\r
\r
/* Security byte definition */\r
\r
/*-----------------------------------------------------------*/\r
\r
-short main( void )\r
-{\r
- /* Creates all the tasks and timers, then starts the scheduler. */\r
-\r
- /* First create the 'standard demo' tasks. These are used to demonstrate\r
- API functions being used and also to test the kernel port. More information\r
- is provided on the FreeRTOS.org WEB site. */\r
- vStartDynamicPriorityTasks();\r
- vStartPolledQueueTasks( tskIDLE_PRIORITY );\r
- vCreateBlockTimeTasks();\r
-\r
- /* Create the RegTest tasks as described at the top of this file. */\r
- xTaskCreate( vRegTest1, "Reg1", configMINIMAL_STACK_SIZE, NULL, 0, NULL );\r
- xTaskCreate( vRegTest2, "Reg2", configMINIMAL_STACK_SIZE, NULL, 0, NULL );\r
-\r
- /* Create the software timer that performs the 'check' functionality,\r
- as described at the top of this file. */\r
- xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */\r
- ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */\r
- pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
- ( void * ) 0, /* The ID is not used, so can be set to anything. */\r
- prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */\r
- );\r
-\r
- /* Create the software timer that just increments a variable for demo\r
- purposes. */\r
- xDemoTimer = xTimerCreate( ( const signed char * ) "DemoTimer",/* A text name, purely to help debugging. */\r
- ( mainDEMO_TIMER_PERIOD_MS ), /* The timer period, in this case it is always calculated relative to the check timer period (see the definition of mainDEMO_TIMER_PERIOD_MS). */\r
- pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
- ( void * ) 0, /* The ID is not used, so can be set to anything. */\r
- prvDemoTimerCallback /* The callback function that inspects the status of all the other tasks. */\r
- );\r
-\r
- /* Start both the check timer and the demo timer. The timers won't actually\r
- start until the scheduler is started. */\r
- xTimerStart( xCheckTimer, mainDONT_BLOCK );\r
- xTimerStart( xDemoTimer, mainDONT_BLOCK );\r
-\r
- /* Finally start the scheduler running. */\r
- vTaskStartScheduler();\r
-\r
- /* If this line is reached then vTaskStartScheduler() returned because there\r
- was insufficient heap memory remaining for the idle task to be created. */\r
- for( ;; );\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
-static void prvDemoTimerCallback( xTimerHandle xTimer )\r
-{\r
- /* The demo timer has expired. All it does is increment a variable. The\r
- period of the demo timer is relative to that of the check timer, so the\r
- check timer knows how many times this variable should have been incremented\r
- between each execution of the check timer's own callback. */\r
- ulDemoSoftwareTimerCounter++;\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+void main( void )\r
{\r
-static portBASE_TYPE xChangedTimerPeriodAlready = pdFALSE, xErrorStatus = pdPASS;\r
-static unsigned short usLastRegTest1Counter = 0, usLastRegTest2Counter = 0;\r
-\r
- /* Inspect the status of the standard demo tasks. */\r
- if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )\r
+ /* The mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting is described at the top\r
+ of this file. */\r
+ #if mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1\r
{\r
- xErrorStatus = pdFAIL;\r
+ main_blinky();\r
}\r
-\r
- if( xArePollingQueuesStillRunning() != pdTRUE )\r
- {\r
- xErrorStatus = pdFAIL;\r
- }\r
-\r
- if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
- {\r
- xErrorStatus = pdFAIL;\r
- }\r
-\r
- /* Indicate an error if either of the reg test loop counters have not\r
- incremented since the last time this function was called. */\r
- if( usLastRegTest1Counter == usRegTest1LoopCounter )\r
- {\r
- xErrorStatus = pdFAIL;\r
- }\r
- else\r
- {\r
- usLastRegTest1Counter = usRegTest1LoopCounter;\r
- }\r
-\r
- if( usLastRegTest2Counter == usRegTest2LoopCounter )\r
- {\r
- xErrorStatus = pdFAIL;\r
- }\r
- else\r
- {\r
- usLastRegTest2Counter = usRegTest2LoopCounter;\r
- }\r
-\r
- /* Ensure that the demo software timer has expired\r
- mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT times in between\r
- each call of this function. A critical section is not required to access\r
- ulDemoSoftwareTimerCounter as the variable is only accessed from another\r
- software timer callback, and only one software timer callback can be\r
- executing at any time. */\r
- if( ( ulDemoSoftwareTimerCounter < ( mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT - 1 ) ) ||\r
- ( ulDemoSoftwareTimerCounter > ( mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT + 1 ) )\r
- )\r
- {\r
- xErrorStatus = pdFAIL;\r
- }\r
- else\r
- {\r
- ulDemoSoftwareTimerCounter = 0UL;\r
- }\r
-\r
- if( ( xErrorStatus == pdFAIL ) && ( xChangedTimerPeriodAlready == pdFALSE ) )\r
+ #else\r
{\r
- /* An error has occurred, but the timer's period has not yet been changed,\r
- change it now, and remember that it has been changed. Shortening the\r
- timer's period means the LED will toggle at a faster rate, giving a\r
- visible indication that something has gone wrong. */\r
- xChangedTimerPeriodAlready = pdTRUE;\r
-\r
- /* This call to xTimerChangePeriod() uses a zero block time. Functions\r
- called from inside of a timer callback function must *never* attempt to\r
- block. */\r
- xTimerChangePeriod( xCheckTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK );\r
+ main_full();\r
}\r
+ #endif\r
+}\r
+/*-----------------------------------------------------------*/\r
\r
- /* Toggle the LED. The toggle rate will depend on whether or not an error\r
- has been found in any tasks. */\r
- LED_BIT = !LED_BIT;\r
+void vAnExampleISR_C_Handler( void )\r
+{\r
+ /*\r
+ * This demo does not include a functional interrupt service routine - so\r
+ * this dummy handler (which is not actually installed) is provided as an\r
+ * example of how an ISR that needs to cause a context switch needs to be\r
+ * implemented. ISRs that do not cause a context switch have no special\r
+ * requirements and can be written as per the compiler documentation.\r
+ *\r
+ * This C function is called from a wrapper function that is implemented\r
+ * in assembly code. See vANExampleISR_ASM_Wrapper() in ExampleISR.s87.\r
+ * Also see the documentation page for this demo on the FreeRTOS.org website\r
+ * for full instructions.\r
+ */\r
+short sHigherPriorityTaskWoken = pdFALSE;\r
+\r
+ /* Handler code goes here...*/\r
+\r
+ /* For purposes of demonstration, assume at some point the hander calls\r
+ xSemaphoreGiveFromISR().*/\r
+ xSemaphoreGiveFromISR( xSemaphore, &sHigherPriorityTaskWoken );\r
+\r
+ /* If giving the semaphore unblocked a task, and the unblocked task has a\r
+ priority higher than or equal to the currently running task, then\r
+ sHigherPriorityTaskWoken will have been set to pdTRUE internally within the\r
+ xSemaphoreGiveFromISR() function. Passing a pdTRUE value to\r
+ portYIELD_FROM_ISR() will cause this interrupt to return directly to the\r
+ higher priority unblocked task. */\r
+ portYIELD_FROM_ISR( sHigherPriorityTaskWoken );\r
}\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vRegTestError( void )\r
-{\r
- /* Called by both reg test tasks if an error is found. There is no way out\r
- of this function so the loop counter of the calling task will stop\r
- incrementing, which will result in the check timer signialling an error. */\r
- for( ;; );\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
void vApplicationMallocFailedHook( void )\r
{\r
/* Called if a call to pvPortMalloc() fails because there is insufficient\r
configTOTAL_HEAP_SIZE value in FreeRTOSConfig.h can be reduced to free up\r
RAM. */\r
xFreeHeapSpace = xPortGetFreeHeapSize();\r
+\r
+ /* Remove compiler warning about xFreeHeapSpace being set but never used. */\r
+ ( void ) xFreeHeapSpace;\r
}\r
\r
+\r
--- /dev/null
+/*\r
+ FreeRTOS V7.4.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+\r
+ FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
+ http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * FreeRTOS tutorial books are available in pdf and paperback. *\r
+ * Complete, revised, and edited pdf reference manuals are also *\r
+ * available. *\r
+ * *\r
+ * Purchasing FreeRTOS documentation will not only help you, by *\r
+ * ensuring you get running as quickly as possible and with an *\r
+ * in-depth knowledge of how to use FreeRTOS, it will also help *\r
+ * the FreeRTOS project to continue with its mission of providing *\r
+ * professional grade, cross platform, de facto standard solutions *\r
+ * for microcontrollers - completely free of charge! *\r
+ * *\r
+ * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *\r
+ * *\r
+ * Thank you for using FreeRTOS, and thank you for your support! *\r
+ * *\r
+ ***************************************************************************\r
+\r
+\r
+ This file is part of the FreeRTOS distribution.\r
+\r
+ FreeRTOS is free software; you can redistribute it and/or modify it under\r
+ the terms of the GNU General Public License (version 2) as published by the\r
+ Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+\r
+ >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
+ distribute a combined work that includes FreeRTOS without being obliged to\r
+ provide the source code for proprietary components outside of the FreeRTOS\r
+ kernel.\r
+\r
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\r
+ details. You should have received a copy of the GNU General Public License\r
+ and the FreeRTOS license exception along with FreeRTOS; if not itcan be\r
+ viewed here: http://www.freertos.org/a00114.html and also obtained by\r
+ writing to Real Time Engineers Ltd., contact details for whom are available\r
+ on the FreeRTOS WEB site.\r
+\r
+ 1 tab == 4 spaces!\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * Having a problem? Start by reading the FAQ "My application does *\r
+ * not run, what could be wrong?" *\r
+ * *\r
+ * http://www.FreeRTOS.org/FAQHelp.html *\r
+ * *\r
+ ***************************************************************************\r
+\r
+\r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+ license and Real Time Engineers Ltd. contact details.\r
+\r
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+ including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
+ fully thread aware and reentrant UDP/IP stack.\r
+\r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems, who sell the code with commercial support,\r
+ indemnification and middleware, under the OpenRTOS brand.\r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
+ mission critical applications that require provable dependability.\r
+*/\r
+\r
+/******************************************************************************\r
+ * NOTE 1: This project provides two demo applications. A simple blinky style\r
+ * project, and a more comprehensive test and demo application. The\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select\r
+ * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY\r
+ * in main.c. This file implements the simply blinky style version.\r
+ *\r
+ * NOTE 2: This file only contains the source code that is specific to the\r
+ * basic demo. Generic functions, such FreeRTOS hook functions, and functions\r
+ * required to configure the hardware, along with an example interrupt service\r
+ * routine, are defined in main.c.\r
+ ******************************************************************************\r
+ *\r
+ * main_blinky() creates one queue, and two tasks. It then starts the\r
+ * scheduler.\r
+ *\r
+ * The Queue Send Task:\r
+ * The queue send task is implemented by the prvQueueSendTask() function in\r
+ * this file. prvQueueSendTask() sits in a loop that causes it to repeatedly\r
+ * block for 200 milliseconds, before sending the value 100 to the queue that\r
+ * was created within main_blinky(). Once the value is sent, the task loops\r
+ * back around to block for another 200 milliseconds.\r
+ *\r
+ * The Queue Receive Task:\r
+ * The queue receive task is implemented by the prvQueueReceiveTask() function\r
+ * in this file. prvQueueReceiveTask() sits in a loop where it repeatedly\r
+ * blocks on attempts to read data from the queue that was created within\r
+ * main_blinky(). When data is received, the task checks the value of the\r
+ * data, and if the value equals the expected 100, toggles the LED. The 'block\r
+ * time' parameter passed to the queue receive function specifies that the\r
+ * task should be held in the Blocked state indefinitely to wait for data to\r
+ * be available on the queue. The queue receive task will only leave the\r
+ * Blocked state when the queue send task writes to the queue. As the queue\r
+ * send task writes to the queue every 200 milliseconds, the queue receive\r
+ * task leaves the Blocked state every 200 milliseconds, and therefore toggles\r
+ * the LED every 200 milliseconds.\r
+ */\r
+\r
+/* Standard includes. */\r
+#include <stdio.h>\r
+\r
+/* Kernel includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+#include "semphr.h"\r
+\r
+/* Eval board specific definitions. */\r
+#include "port_iodefine.h"\r
+#include "port_iodefine_ext.h"\r
+#include "LED.h"\r
+\r
+/* Priorities at which the tasks are created. */\r
+#define mainQUEUE_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
+#define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
+\r
+/* The rate at which data is sent to the queue. The 200ms value is converted\r
+to ticks using the portTICK_RATE_MS constant. */\r
+#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )\r
+\r
+/* The number of items the queue can hold. This is 1 as the receive task\r
+will remove items as they are added, meaning the send task should always find\r
+the queue empty. */\r
+#define mainQUEUE_LENGTH ( 1 )\r
+\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * The tasks as described in the comments at the top of this file.\r
+ */\r
+static void prvQueueReceiveTask( void *pvParameters );\r
+static void prvQueueSendTask( void *pvParameters );\r
+\r
+/*\r
+ * Called by main() to create the simply blinky style application if\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
+ */\r
+void main_blinky( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* The queue used by both tasks. */\r
+static xQueueHandle xQueue = NULL;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void main_blinky( void )\r
+{\r
+ /* Create the queue. */\r
+ xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) );\r
+\r
+ if( xQueue != NULL )\r
+ {\r
+ /* Start the two tasks as described in the comments at the top of this\r
+ file. */\r
+ xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */\r
+ ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */\r
+ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */\r
+ NULL, /* The parameter passed to the task - not used in this case. */\r
+ mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */\r
+ NULL ); /* The task handle is not required, so NULL is passed. */\r
+\r
+ xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL );\r
+\r
+ /* Start the tasks and timer running. */\r
+ vTaskStartScheduler();\r
+ }\r
+\r
+ /* If all is well, the scheduler will now be running, and the following\r
+ line will never be reached. If the following line does execute, then\r
+ there was insufficient FreeRTOS heap memory available for the idle and/or\r
+ timer tasks to be created. See the memory management section on the\r
+ FreeRTOS web site for more details. http://www.freertos.org/a00111.html. */\r
+ for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvQueueSendTask( void *pvParameters )\r
+{\r
+portTickType xNextWakeTime;\r
+const unsigned long ulValueToSend = 100UL;\r
+\r
+ /* Remove compiler warning about unused parameter. */\r
+ ( void ) pvParameters;\r
+\r
+ /* Initialise xNextWakeTime - this only needs to be done once. */\r
+ xNextWakeTime = xTaskGetTickCount();\r
+\r
+ for( ;; )\r
+ {\r
+ /* Place this task in the blocked state until it is time to run again. */\r
+ vTaskDelayUntil( &xNextWakeTime, mainQUEUE_SEND_FREQUENCY_MS );\r
+\r
+ /* Send to the queue - causing the queue receive task to unblock and\r
+ toggle the LED. 0 is used as the block time so the sending operation\r
+ will not block - it shouldn't need to block as the queue should always\r
+ be empty at this point in the code. */\r
+ xQueueSend( xQueue, &ulValueToSend, 0U );\r
+ }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvQueueReceiveTask( void *pvParameters )\r
+{\r
+unsigned long ulReceivedValue;\r
+const unsigned long ulExpectedValue = 100UL;\r
+\r
+ /* Remove compiler warning about unused parameter. */\r
+ ( void ) pvParameters;\r
+\r
+ for( ;; )\r
+ {\r
+ /* Wait until something arrives in the queue - this task will block\r
+ indefinitely provided INCLUDE_vTaskSuspend is set to 1 in\r
+ FreeRTOSConfig.h. */\r
+ xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY );\r
+\r
+ /* To get here something must have been received from the queue, but\r
+ is it the expected value? If it is, toggle the LED. */\r
+ if( ulReceivedValue == ulExpectedValue )\r
+ {\r
+ LED_BIT = !LED_BIT;\r
+ ulReceivedValue = 0U;\r
+ }\r
+ }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
--- /dev/null
+/*\r
+ FreeRTOS V7.4.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+\r
+ FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
+ http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * FreeRTOS tutorial books are available in pdf and paperback. *\r
+ * Complete, revised, and edited pdf reference manuals are also *\r
+ * available. *\r
+ * *\r
+ * Purchasing FreeRTOS documentation will not only help you, by *\r
+ * ensuring you get running as quickly as possible and with an *\r
+ * in-depth knowledge of how to use FreeRTOS, it will also help *\r
+ * the FreeRTOS project to continue with its mission of providing *\r
+ * professional grade, cross platform, de facto standard solutions *\r
+ * for microcontrollers - completely free of charge! *\r
+ * *\r
+ * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *\r
+ * *\r
+ * Thank you for using FreeRTOS, and thank you for your support! *\r
+ * *\r
+ ***************************************************************************\r
+\r
+\r
+ This file is part of the FreeRTOS distribution.\r
+\r
+ FreeRTOS is free software; you can redistribute it and/or modify it under\r
+ the terms of the GNU General Public License (version 2) as published by the\r
+ Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+\r
+ >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
+ distribute a combined work that includes FreeRTOS without being obliged to\r
+ provide the source code for proprietary components outside of the FreeRTOS\r
+ kernel.\r
+\r
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\r
+ details. You should have received a copy of the GNU General Public License\r
+ and the FreeRTOS license exception along with FreeRTOS; if not itcan be\r
+ viewed here: http://www.freertos.org/a00114.html and also obtained by\r
+ writing to Real Time Engineers Ltd., contact details for whom are available\r
+ on the FreeRTOS WEB site.\r
+\r
+ 1 tab == 4 spaces!\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * Having a problem? Start by reading the FAQ "My application does *\r
+ * not run, what could be wrong?" *\r
+ * *\r
+ * http://www.FreeRTOS.org/FAQHelp.html *\r
+ * *\r
+ ***************************************************************************\r
+\r
+\r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+ license and Real Time Engineers Ltd. contact details.\r
+\r
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+ including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
+ fully thread aware and reentrant UDP/IP stack.\r
+\r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems, who sell the code with commercial support,\r
+ indemnification and middleware, under the OpenRTOS brand.\r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
+ mission critical applications that require provable dependability.\r
+*/\r
+\r
+/******************************************************************************\r
+ * NOTE 1: This project provides two demo applications. A simple blinky style\r
+ * project, and a more comprehensive test and demo application. The\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY setting in main.c is used to select\r
+ * between the two. See the notes on using mainCREATE_SIMPLE_BLINKY_DEMO_ONLY\r
+ * in main.c. This file implements the comprehensive test and demo version.\r
+ *\r
+ * NOTE 2: This file only contains the source code that is specific to the\r
+ * full demo. Generic functions, such FreeRTOS hook functions, and functions\r
+ * required to configure the hardware, along with an example of how to write an\r
+ * interrupt service routine, are defined in main.c.\r
+ ******************************************************************************\r
+ *\r
+ * main_full() creates all the demo application tasks and two software timers,\r
+ * then starts the scheduler. The web documentation provides more details of\r
+ * the standard demo application tasks, which provide no particular\r
+ * functionality, but do provide a good example of how to use the FreeRTOS API.\r
+ *\r
+ * In addition to the standard demo tasks, the following tasks, tests and\r
+ * timers are created within this file:\r
+ *\r
+ * "Reg test" tasks - These fill the registers with known values, then check\r
+ * that each register still contains its expected value. Each task uses a\r
+ * different set of values. The reg test tasks execute with a very low priority,\r
+ * so get preempted very frequently. A register containing an unexpected value\r
+ * is indicative of an error in the context switching mechanism.\r
+ *\r
+ * The "Demo" Timer and Callback Function:\r
+ * The demo timer callback function does nothing more than increment a variable.\r
+ * The period of the demo timer is set relative to the period of the check timer\r
+ * (described below). This allows the check timer to know how many times the\r
+ * demo timer callback function should execute between each execution of the\r
+ * check timer callback function. The variable incremented in the demo timer\r
+ * callback function is used to determine how many times the callback function\r
+ * has executed.\r
+ *\r
+ * The "Check" Timer and Callback Function:\r
+ * The check timer period is initially set to three seconds. The check timer\r
+ * callback function checks that all the standard demo tasks, the reg test\r
+ * tasks, and the demo timer are not only still executing, but are executing\r
+ * without reporting any errors. If the check timer discovers that a task or\r
+ * timer has stalled, or reported an error, then it changes its own period from\r
+ * the initial three seconds, to just 200ms. The check timer callback function\r
+ * also toggles an LED each time it is called. This provides a visual\r
+ * indication of the system status: If the LED toggles every three seconds,\r
+ * then no issues have been discovered. If the LED toggles every 200ms, then\r
+ * an issue has been discovered with at least one task.\r
+ *\r
+ * ENSURE TO READ THE DOCUMENTATION PAGE FOR THIS PORT AND DEMO APPLICATION ON\r
+ * THE http://www.FreeRTOS.org WEB SITE FOR FULL INFORMATION ON USING THIS DEMO\r
+ * APPLICATION, AND ITS ASSOCIATE FreeRTOS ARCHITECTURE PORT!\r
+ *\r
+ */\r
+\r
+/* Scheduler include files. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+#include "timers.h"\r
+\r
+/* Standard demo includes. */\r
+#include "dynamic.h"\r
+#include "PollQ.h"\r
+#include "blocktim.h"\r
+\r
+/* Hardware includes. */\r
+#include "port_iodefine.h"\r
+#include "port_iodefine_ext.h"\r
+#include "LED.h"\r
+\r
+/* The period at which the check timer will expire, in ms, provided no errors\r
+have been reported by any of the standard demo tasks. ms are converted to the\r
+equivalent in ticks using the portTICK_RATE_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS ( 3000UL / portTICK_RATE_MS )\r
+\r
+/* The period at which the check timer will expire, in ms, if an error has been\r
+reported in one of the standard demo tasks, the check tasks, or the demo timer.\r
+ms are converted to the equivalent in ticks using the portTICK_RATE_MS\r
+constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS ( 200UL / portTICK_RATE_MS )\r
+\r
+/* These two definitions are used to set the period of the demo timer. The demo\r
+timer period is always relative to the check timer period, so the check timer\r
+can determine if the demo timer has expired the expected number of times between\r
+its own executions. */\r
+#define mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT ( 100UL )\r
+#define mainDEMO_TIMER_PERIOD_MS ( mainCHECK_TIMER_PERIOD_MS / mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT )\r
+\r
+/* A block time of zero simply means "don't block". */\r
+#define mainDONT_BLOCK ( 0U )\r
+\r
+/* Values that are passed as parameters into the reg test tasks (purely to\r
+ensure task parameters are passed correctly). */\r
+#define mainREG_TEST_1_PARAMETER ( ( void * ) 0x1234 )\r
+#define mainREG_TEST_2_PARAMETER ( ( void * ) 0x5678 )\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * The 'check' timer callback function, as described at the top of this file.\r
+ */\r
+static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+\r
+/*\r
+ * The 'demo' timer callback function, as described at the top of this file.\r
+ */\r
+static void prvDemoTimerCallback( xTimerHandle xTimer );\r
+\r
+/*\r
+ * Functions that define the RegTest tasks, as described at the top of this\r
+ * file. The RegTest tasks are written (necessarily) in assembler. Their\r
+ * entry points are written in C to allow for easy checking of the task\r
+ * parameter values.\r
+ */\r
+extern void vRegTest1Task( void );\r
+extern void vRegTest2Task( void );\r
+static void prvRegTest1Entry( void *pvParameters );\r
+static void prvRegTest2Entry( void *pvParameters );\r
+\r
+/*\r
+ * Called if a RegTest task discovers an error as a mechanism to stop the\r
+ * tasks loop counter incrementing (so the check task can detect that an\r
+ * error exists).\r
+ */\r
+void vRegTestError( void );\r
+\r
+/*\r
+ * Called by main() to create the more comprehensive application if\r
+ * mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.\r
+ */\r
+void main_full( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* Variables that are incremented on each cycle of the two reg tests to allow\r
+the check timer to know that they are still executing. */\r
+unsigned short usRegTest1LoopCounter = 0, usRegTest2LoopCounter;\r
+\r
+/* The check timer. This uses prvCheckTimerCallback() as its callback\r
+function. */\r
+static xTimerHandle xCheckTimer = NULL;\r
+\r
+/* The demo timer. This uses prvDemoTimerCallback() as its callback function. */\r
+static xTimerHandle xDemoTimer = NULL;\r
+\r
+/* This variable is incremented each time the demo timer expires. */\r
+static volatile unsigned long ulDemoSoftwareTimerCounter = 0UL;\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void main_full( void )\r
+{\r
+ /* Creates all the tasks and timers, then starts the scheduler. */\r
+\r
+ /* First create the 'standard demo' tasks. These are used to demonstrate\r
+ API functions being used and also to test the kernel port. More information\r
+ is provided on the FreeRTOS.org WEB site. */\r
+ vStartDynamicPriorityTasks();\r
+ vStartPolledQueueTasks( tskIDLE_PRIORITY );\r
+ vCreateBlockTimeTasks();\r
+\r
+ /* Create the RegTest tasks as described at the top of this file. */\r
+ xTaskCreate( prvRegTest1Entry, /* The function that implements the task. */\r
+ ( const signed char * ) "Reg1",/* Text name for the task - to assist debugging only, not used by the kernel. */\r
+ configMINIMAL_STACK_SIZE, /* The size of the stack allocated to the task (in words, not bytes). */\r
+ mainREG_TEST_1_PARAMETER, /* The parameter passed into the task. */\r
+ tskIDLE_PRIORITY, /* The priority at which the task will execute. */\r
+ NULL ); /* Used to pass the handle of the created task out to the function caller - not used in this case. */\r
+\r
+ xTaskCreate( prvRegTest2Entry, ( const signed char * ) "Reg2", configMINIMAL_STACK_SIZE, mainREG_TEST_2_PARAMETER, tskIDLE_PRIORITY, NULL );\r
+\r
+ /* Create the software timer that performs the 'check' functionality,\r
+ as described at the top of this file. */\r
+ xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */\r
+ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */\r
+ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
+ ( void * ) 0, /* The ID is not used, so can be set to anything. */\r
+ prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */\r
+ );\r
+\r
+ /* Create the software timer that just increments a variable for demo\r
+ purposes. */\r
+ xDemoTimer = xTimerCreate( ( const signed char * ) "DemoTimer",/* A text name, purely to help debugging. */\r
+ ( mainDEMO_TIMER_PERIOD_MS ), /* The timer period, in this case it is always calculated relative to the check timer period (see the definition of mainDEMO_TIMER_PERIOD_MS). */\r
+ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
+ ( void * ) 0, /* The ID is not used, so can be set to anything. */\r
+ prvDemoTimerCallback /* The callback function that inspects the status of all the other tasks. */\r
+ );\r
+\r
+ /* Start both the check timer and the demo timer. The timers won't actually\r
+ start until the scheduler is started. */\r
+ xTimerStart( xCheckTimer, mainDONT_BLOCK );\r
+ xTimerStart( xDemoTimer, mainDONT_BLOCK );\r
+\r
+ /* Finally start the scheduler running. */\r
+ vTaskStartScheduler();\r
+\r
+ /* If all is well execution will never reach here as the scheduler will be\r
+ running. If this null loop is reached then it is likely there was\r
+ insufficient FreeRTOS heap available for the idle task and/or timer task to\r
+ be created. See http://www.freertos.org/a00111.html. */\r
+ for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvDemoTimerCallback( xTimerHandle xTimer )\r
+{\r
+ /* Remove compiler warning about unused parameter. */\r
+ ( void ) xTimer;\r
+\r
+ /* The demo timer has expired. All it does is increment a variable. The\r
+ period of the demo timer is relative to that of the check timer, so the\r
+ check timer knows how many times this variable should have been incremented\r
+ between each execution of the check timer's own callback. */\r
+ ulDemoSoftwareTimerCounter++;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+{\r
+static portBASE_TYPE xChangedTimerPeriodAlready = pdFALSE, xErrorStatus = pdPASS;\r
+static unsigned short usLastRegTest1Counter = 0, usLastRegTest2Counter = 0;\r
+\r
+ /* Remove compiler warning about unused parameter. */\r
+ ( void ) xTimer;\r
+\r
+ /* Inspect the status of the standard demo tasks. */\r
+ if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )\r
+ {\r
+ xErrorStatus = pdFAIL;\r
+ }\r
+\r
+ if( xArePollingQueuesStillRunning() != pdTRUE )\r
+ {\r
+ xErrorStatus = pdFAIL;\r
+ }\r
+\r
+ if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
+ {\r
+ xErrorStatus = pdFAIL;\r
+ }\r
+\r
+ /* Indicate an error if either of the reg test loop counters have not\r
+ incremented since the last time this function was called. */\r
+ if( usLastRegTest1Counter == usRegTest1LoopCounter )\r
+ {\r
+ xErrorStatus = pdFAIL;\r
+ }\r
+ else\r
+ {\r
+ usLastRegTest1Counter = usRegTest1LoopCounter;\r
+ }\r
+\r
+ if( usLastRegTest2Counter == usRegTest2LoopCounter )\r
+ {\r
+ xErrorStatus = pdFAIL;\r
+ }\r
+ else\r
+ {\r
+ usLastRegTest2Counter = usRegTest2LoopCounter;\r
+ }\r
+\r
+ /* Ensure that the demo software timer has expired\r
+ mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT times in between\r
+ each call of this function. A critical section is not required to access\r
+ ulDemoSoftwareTimerCounter as the variable is only accessed from another\r
+ software timer callback, and only one software timer callback can be\r
+ executing at any time. */\r
+ if( ( ulDemoSoftwareTimerCounter < ( mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT - 1 ) ) ||\r
+ ( ulDemoSoftwareTimerCounter > ( mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT + 1 ) )\r
+ )\r
+ {\r
+ xErrorStatus = pdFAIL;\r
+ }\r
+ else\r
+ {\r
+ ulDemoSoftwareTimerCounter = 0UL;\r
+ }\r
+\r
+ if( ( xErrorStatus == pdFAIL ) && ( xChangedTimerPeriodAlready == pdFALSE ) )\r
+ {\r
+ /* An error has occurred, but the timer's period has not yet been changed,\r
+ change it now, and remember that it has been changed. Shortening the\r
+ timer's period means the LED will toggle at a faster rate, giving a\r
+ visible indication that something has gone wrong. */\r
+ xChangedTimerPeriodAlready = pdTRUE;\r
+\r
+ /* This call to xTimerChangePeriod() uses a zero block time. Functions\r
+ called from inside of a timer callback function must *never* attempt to\r
+ block. */\r
+ xTimerChangePeriod( xCheckTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK );\r
+ }\r
+\r
+ /* Toggle the LED. The toggle rate will depend on whether or not an error\r
+ has been found in any tasks. */\r
+ LED_BIT = !LED_BIT;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+void vRegTestError( void )\r
+{\r
+ /* Called by both reg test tasks if an error is found. There is no way out\r
+ of this function so the loop counter of the calling task will stop\r
+ incrementing, which will result in the check timer signaling an error. */\r
+ for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvRegTest1Entry( void *pvParameters )\r
+{\r
+ /* If the parameter has its expected value then start the first reg test\r
+ task (this is only done to test that the RTOS port is correctly handling\r
+ task parameters. */\r
+ if( pvParameters == mainREG_TEST_1_PARAMETER )\r
+ {\r
+ vRegTest1Task();\r
+ }\r
+ else\r
+ {\r
+ vRegTestError();\r
+ }\r
+\r
+ /* It is not possible to get here as neither of the two functions called\r
+ above will ever return. */\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvRegTest2Entry( void *pvParameters )\r
+{\r
+ /* If the parameter has its expected value then start the first reg test\r
+ task (this is only done to test that the RTOS port is correctly handling\r
+ task parameters. */\r
+ if( pvParameters == mainREG_TEST_2_PARAMETER )\r
+ {\r
+ vRegTest2Task();\r
+ }\r
+ else\r
+ {\r
+ vRegTestError();\r
+ }\r
+\r
+ /* It is not possible to get here as neither of the two functions called\r
+ above will ever return. */\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
@REM \r
\r
\r
-"C:\devtools\IAR Systems\Embedded Workbench 6.5\common\bin\cspybat" "C:\devtools\IAR Systems\Embedded Workbench 6.5\rl78\bin\rl78proc.dll" "C:\devtools\IAR Systems\Embedded Workbench 6.5\rl78\bin\rl78ocd.dll" %1 --plugin "C:\devtools\IAR Systems\Embedded Workbench 6.5\rl78\bin\rl78bat.dll" --backend -B "--core" "rl78_1" "--near_const_location" "rom0" "--near_const_start" "0xf2000" "--near_const_size" "24.00" "-p" "C:\devtools\IAR Systems\Embedded Workbench 6.5\rl78\config\debugger\ior5f10jgc.ddf" "-d" "e1" \r
+"C:\devtools\IAR Systems\Embedded Workbench 6.5\common\bin\cspybat" "C:\devtools\IAR Systems\Embedded Workbench 6.5\rl78\bin\rl78proc.dll" "C:\devtools\IAR Systems\Embedded Workbench 6.5\rl78\bin\rl78ocd.dll" %1 --plugin "C:\devtools\IAR Systems\Embedded Workbench 6.5\rl78\bin\rl78bat.dll" --backend -B "--core" "rl78_2" "--near_const_location" "rom0" "--near_const_start" "0xf3000" "--near_const_size" "27.75" "-p" "C:\devtools\IAR Systems\Embedded Workbench 6.5\rl78\config\debugger\ior5f104pj.ddf" "-d" "tk" \r
\r
\r
<Factory>Workspace</Factory>\r
<Session>\r
\r
- <NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/Demo Source</ExpandedNode><ExpandedNode>RTOSDemo/Demo Source/StandardDemos</ExpandedNode><ExpandedNode>RTOSDemo/Kernel Source</ExpandedNode></NodeDict></Session>\r
+ <NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/Demo Source</ExpandedNode><ExpandedNode>RTOSDemo/Demo Source/StandardDemos</ExpandedNode><ExpandedNode>RTOSDemo/Kernel Source</ExpandedNode><ExpandedNode>RTOSDemo/Output</ExpandedNode></NodeDict></Session>\r
</Tab>\r
</Tabs>\r
\r
- <SelectedTab>0</SelectedTab></Wnd3><Wnd0><Tabs><Tab><Identity>TabID-10616-6959</Identity><TabName>Disassembly</TabName><Factory>Disassembly</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd0></Windows>\r
+ <SelectedTab>0</SelectedTab></Wnd3></Windows>\r
<Editor>\r
\r
\r
\r
\r
- <Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\RL78\portmacro.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\MemMang\heap_1.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\RegTest.s87</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>173</YPos2><SelStart2>6586</SelStart2><SelEnd2>6586</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\tasks.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\RL78\port_iodefine.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>195</YPos2><SelStart2>10359</SelStart2><SelEnd2>10359</SelEnd2></Tab><ActiveTab>6</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\RL78\port.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\RL78\port_iodefine_ext.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\RL78\portasm.s87</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\Common\Minimal\dynamic.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\LED.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>\r
+ <Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>139</YPos2><SelStart2>7563</SelStart2><SelEnd2>7563</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\LED.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>66</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>92</YPos2><SelStart2>6374</SelStart2><SelEnd2>6374</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>\r
<Positions>\r
\r
\r
\r
\r
\r
- <Top><Row0><Sizes><Toolbar-01349048><key>iaridepm.enu1</key></Toolbar-01349048></Sizes></Row0><Row1><Sizes><Toolbar-04df7170><key>debuggergui.enu1</key></Toolbar-04df7170><Toolbar-04df6b78><key>rl78ocd.enu1</key></Toolbar-04df6b78></Sizes></Row1><Row2><Sizes/></Row2><Row3><Sizes/></Row3><Row4><Sizes/></Row4></Top><Left><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>808</Bottom><Right>316</Right><x>-2</x><y>-2</y><xscreen>141</xscreen><yscreen>108</yscreen><sizeHorzCX>83929</sizeHorzCX><sizeHorzCY>109980</sizeHorzCY><sizeVertCX>189286</sizeVertCX><sizeVertCY>824847</sizeVertCY></Rect></Wnd3></Sizes></Row0></Left><Right><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>808</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>824847</sizeVertCY></Rect></Wnd0></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>106</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>108</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>109980</sizeHorzCY><sizeVertCX>83929</sizeVertCX><sizeVertCY>109980</sizeVertCY></Rect></Wnd2></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>\r
+ <Top><Row0><Sizes><Toolbar-01349048><key>iaridepm.enu1</key></Toolbar-01349048></Sizes></Row0><Row1><Sizes><Toolbar-08d62b70><key>debuggergui.enu1</key></Toolbar-08d62b70></Sizes></Row1><Row2><Sizes><Toolbar-093ec820><key>rl78ocd.enu1</key></Toolbar-093ec820></Sizes></Row2><Row3><Sizes/></Row3><Row4><Sizes/></Row4><Row5><Sizes/></Row5><Row6><Sizes/></Row6><Row7><Sizes/></Row7></Top><Left><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>784</Bottom><Right>316</Right><x>-2</x><y>-2</y><xscreen>141</xscreen><yscreen>108</yscreen><sizeHorzCX>83929</sizeHorzCX><sizeHorzCY>109980</sizeHorzCY><sizeVertCX>189286</sizeVertCX><sizeVertCY>800407</sizeVertCY></Rect></Wnd3></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>106</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>108</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>109980</sizeHorzCY><sizeVertCX>83929</sizeVertCX><sizeVertCY>109980</sizeVertCY></Rect></Wnd2></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>\r
</Desktop>\r
</Project>\r
\r
-[InterruptLog]\r
-LogEnabled=0\r
-SumEnabled=0\r
-GraphEnabled=0\r
-ShowTimeLog=1\r
-ShowTimeSum=1\r
-SumSortOrder=0\r
-[Interrupts]\r
-Enabled=1\r
-[MemoryMap]\r
-Enabled=0\r
-Base=0\r
-UseAuto=0\r
-TypeViolation=1\r
-UnspecRange=1\r
-ActionState=1\r
[DebugChecksum]\r
-Checksum=1634009173\r
+Checksum=-776555801\r
[DisAssemblyWindow]\r
NumStates=_ 1\r
State 1=_ 1\r
ShowArgs=0\r
[Disassembly]\r
MixedMode=1\r
-[DataSample]\r
+[InterruptLog]\r
LogEnabled=0\r
+SumEnabled=0\r
GraphEnabled=0\r
ShowTimeLog=1\r
ShowTimeSum=1\r
-[Breakpoints]\r
+SumSortOrder=0\r
+[DataLog]\r
+LogEnabled=0\r
+SumEnabled=0\r
+GraphEnabled=0\r
+ShowTimeLog=1\r
+ShowTimeSum=1\r
+[Breakpoints2]\r
Count=0\r
+[Interrupts]\r
+Enabled=1\r
+[MemoryMap]\r
+Enabled=0\r
+Base=0\r
+UseAuto=0\r
+TypeViolation=1\r
+UnspecRange=1\r
+ActionState=1\r
+[Trace1]\r
+Enabled=0\r
+ShowSource=1\r
+[DataSample]\r
+LogEnabled=0\r
+GraphEnabled=0\r
+ShowTimeLog=1\r
+ShowTimeSum=1\r
[Log file]\r
LoggingEnabled=_ 0\r
LogFile=_ ""\r
[TermIOLog]\r
LoggingEnabled=_ 0\r
LogFile=_ ""\r
-[Aliases]\r
-A0=_ "C:\Data\RL78_STICK\FreeRTOSV6.1.1\Source\portable\IAR\RL78\portasm.s87" "E:\Data\RL78_STICK\FreeRTOSV6.1.1\Source\portable\IAR\RL78\portasm.s87"\r
-Count=1\r
-SuppressDialog=1\r
[TraceHelper]\r
Enabled=0\r
ShowSource=1\r
Graph=0\r
Symbiont=0\r
Exclusions=\r
+[Breakpoints]\r
+Count=0\r
+[Aliases]\r
+A0=_ "C:\Data\RL78_STICK\FreeRTOSV6.1.1\Source\portable\IAR\RL78\portasm.s87" "E:\Data\RL78_STICK\FreeRTOSV6.1.1\Source\portable\IAR\RL78\portasm.s87"\r
+Count=1\r
+SuppressDialog=1\r
<Workspace>\r
<ConfigDictionary>\r
\r
- <CurrentConfigs><Project>RTOSDemo/RSKRL78G1C</Project></CurrentConfigs></ConfigDictionary>\r
+ <CurrentConfigs><Project>RTOSDemo/YRDKRL78G14</Project></CurrentConfigs></ConfigDictionary>\r
<Desktop>\r
<Static>\r
<Workspace>\r
<Factory>Workspace</Factory>\r
<Session>\r
\r
- <NodeDict><ExpandedNode>RTOSDemo</ExpandedNode></NodeDict></Session>\r
+ <NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/Demo Source</ExpandedNode><ExpandedNode>RTOSDemo/Demo Source/main.c</ExpandedNode><ExpandedNode>RTOSDemo/Output</ExpandedNode></NodeDict></Session>\r
</Tab>\r
</Tabs>\r
\r
\r
\r
\r
- <Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\RL78\portmacro.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\MemMang\heap_1.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\RegTest.s87</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>173</YPos2><SelStart2>6586</SelStart2><SelEnd2>6586</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\tasks.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\RL78\port_iodefine.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>204</YPos2><SelStart2>10653</SelStart2><SelEnd2>10653</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\RL78\port.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\RL78\port_iodefine_ext.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\RL78\portasm.s87</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>0</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\Common\Minimal\dynamic.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>371</YPos2><SelStart2>16495</SelStart2><SelEnd2>16495</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\LED.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>66</YPos2><SelStart2>4654</SelStart2><SelEnd2>4654</SelEnd2></Tab><ActiveTab>11</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>\r
+ <Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>139</YPos2><SelStart2>7563</SelStart2><SelEnd2>7563</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\LED.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>66</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>92</YPos2><SelStart2>6374</SelStart2><SelEnd2>6374</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>\r
<Positions>\r
\r
\r
\r
\r
\r
- <Top><Row0><Sizes><Toolbar-01349048><key>iaridepm.enu1</key></Toolbar-01349048></Sizes></Row0><Row1><Sizes/></Row1><Row2><Sizes/></Row2><Row3><Sizes/></Row3><Row4><Sizes/></Row4><Row5><Sizes/></Row5><Row6><Sizes/></Row6><Row7><Sizes/></Row7><Row8><Sizes/></Row8><Row9><Sizes/></Row9><Row10><Sizes/></Row10><Row11><Sizes/></Row11><Row12><Sizes/></Row12><Row13><Sizes/></Row13><Row14><Sizes/></Row14><Row15><Sizes/></Row15><Row16><Sizes/></Row16><Row17><Sizes/></Row17><Row18><Sizes/></Row18><Row19><Sizes/></Row19><Row20><Sizes/></Row20><Row21><Sizes/></Row21><Row22><Sizes/></Row22></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>639</Bottom><Right>409</Right><x>-2</x><y>-2</y><xscreen>647</xscreen><yscreen>471</yscreen><sizeHorzCX>385119</sizeHorzCX><sizeHorzCY>479633</sizeHorzCY><sizeVertCX>244643</sizeVertCX><sizeVertCY>652749</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>299</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>301</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>306517</sizeHorzCY><sizeVertCX>505357</sizeVertCX><sizeVertCY>608961</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>\r
+ <Top><Row0><Sizes><Toolbar-01349048><key>iaridepm.enu1</key></Toolbar-01349048></Sizes></Row0><Row1><Sizes/></Row1><Row2><Sizes/></Row2><Row3><Sizes/></Row3><Row4><Sizes/></Row4><Row5><Sizes/></Row5><Row6><Sizes/></Row6><Row7><Sizes/></Row7><Row8><Sizes/></Row8><Row9><Sizes/></Row9><Row10><Sizes/></Row10></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>639</Bottom><Right>409</Right><x>-2</x><y>-2</y><xscreen>647</xscreen><yscreen>471</yscreen><sizeHorzCX>385119</sizeHorzCX><sizeHorzCY>479633</sizeHorzCY><sizeVertCX>244643</sizeVertCX><sizeVertCY>652749</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>299</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>301</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>306517</sizeHorzCY><sizeVertCX>505357</sizeVertCX><sizeVertCY>608961</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>\r
</Desktop>\r
</Workspace>\r
\r