]> git.sur5r.net Git - freertos/commitdiff
Still a work in progress. Need to add flop support.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 15 Jan 2010 17:20:09 +0000 (17:20 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 15 Jan 2010 17:20:09 +0000 (17:20 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@957 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/SuperH_SH7216_Renesas/RTOSDemo.tws
Demo/SuperH_SH7216_Renesas/RTOSDemo/FreeRTOSConfig.h [new file with mode: 0644]
Demo/SuperH_SH7216_Renesas/RTOSDemo/ParTest/ParTest.c
Demo/SuperH_SH7216_Renesas/RTOSDemo/RTOSDemo.hwp
Demo/SuperH_SH7216_Renesas/RTOSDemo/RTOSDemo.nav
Demo/SuperH_SH7216_Renesas/RTOSDemo/SessionSH7216_E10A-USB_SYSTEM__SH.hsf
Demo/SuperH_SH7216_Renesas/RTOSDemo/intprg.c
Demo/SuperH_SH7216_Renesas/RTOSDemo/main.c
Demo/SuperH_SH7216_Renesas/RTOSDemo/regtest.src
Demo/SuperH_SH7216_Renesas/RTOSDemo/vecttbl.c

index 2303b819be2b11f4c6cc9061aea21c29d707f4c8..3ae1526c61aac17400a5b603617275b85b8c586a 100644 (file)
@@ -7,17 +7,23 @@
 [GENERAL_DATA]\r
 [BREAKPOINTS]\r
 [OPEN_WORKSPACE_FILES]\r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\FreeRTOSConfig.h" \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\intprg.c" \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\main.c" \r
-"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\regtest.src" \r
-"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\vecttbl.c" \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\port.c" \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\portasm.src" \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" \r
 [WORKSPACE_FILE_STATES]\r
-"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\main.c" 0 0 918 659 0 0 \r
-"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\regtest.src" -4 -23 1016 659 1 4 \r
-"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\vecttbl.c" 0 0 712 434 0 3 \r
-"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\port.c" 0 0 1400 586 0 1 \r
-"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\portasm.src" 0 0 805 659 0 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" 44 44 838 434 0 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\FreeRTOSConfig.h" 132 132 838 434 0 6 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\intprg.c" 22 22 838 434 0 1 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\main.c" 0 0 1075 659 0 0 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\port.c" 66 66 838 434 0 3 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\portasm.src" 88 88 838 434 0 4 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" -4 -23 1044 659 1 7 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" 110 110 838 434 0 5 \r
 [LOADED_PROJECTS]\r
 "RTOSDemo" \r
 [END]\r
diff --git a/Demo/SuperH_SH7216_Renesas/RTOSDemo/FreeRTOSConfig.h b/Demo/SuperH_SH7216_Renesas/RTOSDemo/FreeRTOSConfig.h
new file mode 100644 (file)
index 0000000..9ef7ca7
--- /dev/null
@@ -0,0 +1,113 @@
+/*\r
+    FreeRTOS V6.0.2 - Copyright (C) 2009 Real Time Engineers Ltd.\r
+\r
+    ***************************************************************************\r
+    *                                                                         *\r
+    * If you are:                                                             *\r
+    *                                                                         *\r
+    *    + New to FreeRTOS,                                                   *\r
+    *    + Wanting to learn FreeRTOS or multitasking in general quickly       *\r
+    *    + Looking for basic training,                                        *\r
+    *    + Wanting to improve your FreeRTOS skills and productivity           *\r
+    *                                                                         *\r
+    * then take a look at the FreeRTOS eBook                                  *\r
+    *                                                                         *\r
+    *        "Using the FreeRTOS Real Time Kernel - a Practical Guide"        *\r
+    *                  http://www.FreeRTOS.org/Documentation                  *\r
+    *                                                                         *\r
+    * A pdf reference manual is also available.  Both are usually delivered   *\r
+    * to your inbox within 20 minutes to two hours when purchased between 8am *\r
+    * and 8pm GMT (although please allow up to 24 hours in case of            *\r
+    * exceptional circumstances).  Thank you for your support!                *\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
+    ***NOTE*** The exception to the GPL is included to allow you to distribute\r
+    a combined work that includes FreeRTOS without being obliged to provide the\r
+    source code for proprietary components outside of the FreeRTOS kernel.\r
+    FreeRTOS is distributed in the hope that it will be useful, but WITHOUT\r
+    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
+    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
+    more details. You should have received a copy of the GNU General Public \r
+    License and the FreeRTOS license exception along with FreeRTOS; if not it \r
+    can be viewed here: http://www.freertos.org/a00114.html and also obtained \r
+    by writing to Richard Barry, contact details for whom are available on the\r
+    FreeRTOS WEB site.\r
+\r
+    1 tab == 4 spaces!\r
+\r
+    http://www.FreeRTOS.org - Documentation, latest information, license and\r
+    contact details.\r
+\r
+    http://www.SafeRTOS.com - A version that is certified for use in safety\r
+    critical systems.\r
+\r
+    http://www.OpenRTOS.com - Commercial support, development, porting,\r
+    licensing and training services.\r
+*/\r
+\r
+#include "iodefine.h"\r
+\r
+#ifndef FREERTOS_CONFIG_H\r
+#define FREERTOS_CONFIG_H\r
+\r
+/*-----------------------------------------------------------\r
+ * Application specific definitions.\r
+ *\r
+ * These definitions should be adjusted for your particular hardware and\r
+ * application requirements.\r
+ *\r
+ * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE\r
+ * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.\r
+ *\r
+ * See http://www.freertos.org/a00110.html.\r
+ *----------------------------------------------------------*/\r
+\r
+#define configUSE_PREEMPTION                   1\r
+#define configUSE_IDLE_HOOK                            1\r
+#define configUSE_TICK_HOOK                            1\r
+#define configCPU_CLOCK_HZ                             ( 200000000UL )\r
+#define configPERIPHERAL_CLOCK_HZ              ( 50000000UL )\r
+#define configTICK_RATE_HZ                             ( ( portTickType ) 1000 )\r
+#define configMINIMAL_STACK_SIZE               ( ( unsigned short ) 140 )\r
+#define configTOTAL_HEAP_SIZE                  ( ( size_t ) ( 32 * 1024 ) )\r
+#define configMAX_TASK_NAME_LEN                        ( 12 )\r
+#define configUSE_TRACE_FACILITY               0\r
+#define configUSE_16_BIT_TICKS                 0\r
+#define configIDLE_SHOULD_YIELD                        0\r
+#define configUSE_CO_ROUTINES                  0\r
+#define configUSE_MUTEXES                              1\r
+#define configCHECK_FOR_STACK_OVERFLOW 0\r
+#define configUSE_RECURSIVE_MUTEXES            1\r
+#define configQUEUE_REGISTRY_SIZE              0\r
+#define configGENERATE_RUN_TIME_STATS  0\r
+#define configUSE_MALLOC_FAILED_HOOK   1\r
+\r
+#define configMAX_PRIORITIES           ( ( unsigned portBASE_TYPE ) 5 )\r
+#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
+\r
+/* Set the following definitions to 1 to include the API function, or zero\r
+to exclude the API function. */\r
+\r
+#define INCLUDE_vTaskPrioritySet                       1\r
+#define INCLUDE_uxTaskPriorityGet                      1\r
+#define INCLUDE_vTaskDelete                                    1\r
+#define INCLUDE_vTaskCleanUpResources          0\r
+#define INCLUDE_vTaskSuspend                           1\r
+#define INCLUDE_vTaskDelayUntil                                1\r
+#define INCLUDE_vTaskDelay                                     1\r
+#define INCLUDE_uxTaskGetStackHighWaterMark    1\r
+\r
+\r
+#define configKERNEL_INTERRUPT_PRIORITY                ( 1 )\r
+#define configMAX_SYSCALL_INTERRUPT_PRIORITY   ( 0xff )\r
+\r
+#define pvPortMallocAligned( x, puxStackBuffer ) ( ( puxStackBuffer == NULL ) ? ( pvPortMalloc( x ) ) : ( puxStackBuffer ) )\r
+#define vPortFreeAligned( x ) ( void ) x\r
+\r
+#endif /* FREERTOS_CONFIG_H */\r
index 9f785f2154ebb97665aea8b10219c138f3105dad..6d3d7409720a05fc61f8ebd05f1a36b00b131cd1 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V6.0.1 - Copyright (C) 2009 Real Time Engineers Ltd.\r
+    FreeRTOS V6.0.2 - Copyright (C) 2009 Real Time Engineers Ltd.\r
 \r
     ***************************************************************************\r
     *                                                                         *\r
index d3ddb2e16966280a6b96f46e269cd7308b5da066..a503edb08d13c14ffff4e9a55a4176d24fc61e82 100644 (file)
 "Object file" "Renesas OptLinker" "Renesas SH Assembler" \r
 "Object file" "Renesas OptLinker" "Renesas SH C/C++ Compiler" \r
 [PROJECT_FILES]\r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\BlockQ.c" "User" "C source file|Standard Demo Tasks" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\GenQTest.c" "User" "C source file|Standard Demo Tasks" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" "User" "C source file|Standard Demo Tasks" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\QPeek.c" "User" "C source file|Standard Demo Tasks" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\blocktim.c" "User" "C source file|Standard Demo Tasks" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\death.c" "User" "C source file|Standard Demo Tasks" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash.c" "User" "C source file|Standard Demo Tasks" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\integer.c" "User" "C source file|Standard Demo Tasks" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\recmutex.c" "User" "C source file|Standard Demo Tasks" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\semtest.c" "User" "C source file|Standard Demo Tasks" 2 \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\ParTest\ParTest.c" "User" "C source file" 2 \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\dbsct.c" "User" "C source file" 2 \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\intprg.c" "User" "C source file" 2 \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\list.c" "User" "C source file|FreeRTOS" 2 \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\MemMang\heap_2.c" "User" "C source file|FreeRTOS" 2 \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\port.c" "User" "C source file|FreeRTOS" 2 \r
-"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\portasm.src" "User" "Assembly source file" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\portasm.src" "User" "C source file|FreeRTOS" 2 \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" "User" "C source file|FreeRTOS" 2 \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" "User" "C source file|FreeRTOS" 2 \r
 [FOLDER]\r
 "Assembly source file" "Assembly source file" \r
 "C source file" "C source file" \r
 "C source file|FreeRTOS" "" \r
+"C source file|Standard Demo Tasks" "" \r
 [GENERAL_DATA_PROJECT]\r
 "USE_CUSTOM_LINKAGE_ORDER" "0" \r
 [ON_DEMAND_COMPONENTS_LOADED]\r
 "SessionSH7216_E10A-USB_SYSTEM__SH" "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\SessionSH7216_E10A-USB_SYSTEM__SH.hsf" 0 \r
 [GENERAL_DATA_SESSION_SessionSH7216_E10A-USB_SYSTEM__SH]\r
 [OPTIONS_Debug_SH7216_E10A-USB_SYSTEM__SH_Renesas OptLinker]\r
-"Single Shot" "0d47a4b27059ac10" 4 \r
+"Single Shot" "08cd3a35ef59ac10" 4 \r
 [OPTIONS_Debug_SH7216_E10A-USB_SYSTEM__SH_Renesas SH Assembler]\r
 "Assembly source file" "05db08d6f178ac10" 3 \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\regtest.src" "0fd8e3b27059ac10" 3 \r
 [OPTIONS_Debug_SH7216_E10A-USB_SYSTEM__SH_Renesas SH C/C++ Compiler]\r
 "C source file" "0deaf32ba059ac10" 2 \r
 "C++ source file" "0deaf32ba059ac10" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\BlockQ.c" "0b5de7fadf59ac10" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\GenQTest.c" "0b5de7fadf59ac10" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" "0b5de7fadf59ac10" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\QPeek.c" "0b5de7fadf59ac10" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\blocktim.c" "0b5de7fadf59ac10" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\death.c" "0cf7e835ef59ac10" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash.c" "00a9f52d4f59ac10" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\integer.c" "0b5de7fadf59ac10" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\recmutex.c" "0b5de7fadf59ac10" 2 \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\semtest.c" "0b5de7fadf59ac10" 2 \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\ParTest\ParTest.c" "0deaf32ba059ac10" 2 \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\dbsct.c" "0deaf32ba059ac10" 2 \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\intprg.c" "0deaf32ba059ac10" 2 \r
index ac41d6529f2532a9ac4155c1e18868731d7b3a51..7f4fbf13b6b843fedbd4c9c2d5c979247322bc09 100644 (file)
Binary files a/Demo/SuperH_SH7216_Renesas/RTOSDemo/RTOSDemo.nav and b/Demo/SuperH_SH7216_Renesas/RTOSDemo/RTOSDemo.nav differ
index 8138c036286e2fe86f04f98a62a36982052acf55..b4a52a0f1648dc3f0511173a8712eae322b0552e 100644 (file)
@@ -8,6 +8,7 @@
 "" \r
 [GENERAL_DATA]\r
 "FIRST_CONNECTION_TAG" "NO" \r
+"MRULABELS_DATAMANAGER_KEY" "FFFFFFFF|00000000|fff80688" \r
 "RESET_CPU_AFTER_DOWNLOAD_TAG" "VARIANT_FALSE_STORE_TAG" \r
 "{08009853-4189-4ADA-848F-0F1A84AFE443}MonitorCtrlLabelAddress" "" \r
 "{08009853-4189-4ADA-848F-0F1A84AFE443}MonitorCtrlMonitorLastSaveLogDirectory" "" \r
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlLogFileName" "" \r
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlSplitterPosition" "242" \r
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlViews" "1" \r
-"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlWindowProperties" "18\r
+"{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineCtrlWindowProperties" "17\r
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}CmdLineWndInstanceKey0" "{WK_00000001_CmdLine}RTOSDemoSessionSH7216_E10A-USB_SYSTEM__SH" \r
 "{313F4FC1-6566-11D5-8BBE-0004E2013C71}TclTkCtrlLogFileName" "" \r
 "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_COMPARE_END_ADDRESS" "" \r
 "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_COMPARE_START_ADDRESS" "" \r
-"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_DEST_ADDRESS" "" \r
-"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_END_ADDRESS" "" \r
-"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_START_ADDRESS" "" \r
+"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_DEST_ADDRESS" "fff80688\r
+"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_END_ADDRESS" "FFFFFFFF\r
+"{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_DISPLAY_START_ADDRESS" "00000000\r
 "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_FILL_END_ADDRESS" "" \r
 "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_FILL_START_ADDRESS" "" \r
 "{313F4FC2-6566-11D5-8BBE-0004E2013C71}ECX_MEMORY_MOVE_END_ADDRESS" "" \r
@@ -80,7 +81,7 @@
 "{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE_SAMPLING_RATE" "1000" \r
 "{8A898260-6F1D-11D5-8EB6-00004CC34E9D}WaveformCtrlViews" "0" \r
 "{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersCtrlViews" "1" \r
-"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0ColumnWidth" "50,307,118" \r
+"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0ColumnWidth" "50,396,118" \r
 "{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0ECX_REGISTER_COUNT" "82" \r
 "{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0ECX_REGISTER_DISPLAYED" "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" \r
 "{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0HideFLAGs" "1" \r
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ColWidth3" "200" \r
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000" "pxCurrentTCB, 4, 0, P, Col, Hex, MN" \r
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0000_SCOPE" "Current Scope," \r
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "*, 11, 0, C0000, Exp, Hex, N" \r
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001" "i, 10, 0, P, Col, Hex, N" \r
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0001_SCOPE" "Current Scope," \r
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0002" "pxTopOfStack, 4, 0, C0001, Col, Hex, N" \r
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0003" "xGenericListItem, 11, 0, C0001, Col, Hex, N" \r
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0004" "xEventListItem, 11, 0, C0001, Col, Hex, N" \r
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0006" "pxStack, 4, 0, C0001, Col, Hex, N" \r
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0007" "pcTaskName, 6, 0, C0001, Col, Hex, N" \r
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEM0008" "uxCriticalNesting, 2, 0, C0001, Col, Hex, N" \r
-"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "1\r
+"{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd0ECX_WATCH_ITEMCnt" "2\r
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth0" "120" \r
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth1" "150" \r
 "{B266D880-6FA1-11D5-8613-00A024591A38}WatchWnd1ColWidth12" "150" \r
 "{D293FA15-461F-4D9F-B9C9-64724B3409F9}T_TRACE_TRACE_ACQUISITION2" "1,0,1,1,1,1,1,0,0,0,0,0,0" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_EVAL_DENORMAL_MODE" "16777216" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_EVAL_ROUND_MODE" "768" \r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_0" "00000000FFF80AD4" \r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_1" "0000000000000001\r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_10" "000000000000000B\r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_11" "000000000000000C\r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_12" "000000000000000D\r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_13" "000000000000000E\r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_14" "0000000000000022\r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_15" "00000000FFF801E0" \r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_16" "0000000000001EF0\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_0" "00000000FFF83504" \r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_1" "00000000FFFFFF0F\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_10" "00000000FFFFFFFE\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_11" "00000000FFE7FFFF\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_12" "00000000FFE7FFFF\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_13" "00000000FFE7FFFF\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_14" "00000000FFF83230\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_15" "00000000FFF83500" \r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_16" "0000000000003B0C\r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_17" "0000000000000001" \r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_18" "0000000000000011\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_18" "0000000000000075\r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_19" "0000000000000000" \r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_2" "0000000000000003\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_2" "0000000000000001\r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_20" "0000000000000000" \r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_21" "0000000000000010\r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_22" "000000000000000F\r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_23" "0000000000000011\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_21" "0000000000000011\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_22" "0000000000000010\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_23" "0000000000001EBE\r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_24" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_25" "0000000000040001" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_26" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_27" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_28" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_29" "0000000000000000" \r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_3" "0000000000000004\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_3" "000000000000566C\r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_30" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_31" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_32" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_37" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_38" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_39" "0000000000000000" \r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_4" "0000000000000005\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_4" "00000000FFF83504\r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_40" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_41" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_42" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_47" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_48" "0000000000000000" \r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_49" "0000000000000000" \r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_5" "0000000000000006\r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_6" "0000000000000007\r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_7" "0000000000000008\r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_8" "0000000000000009\r
-"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_9" "000000000000000A\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_5" "00000000FFF8328C\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_6" "00000000FFF83288\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_7" "00000000FFF832AC\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_8" "0000000000000008\r
+"{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_9" "0000000000000009\r
 "{D34C8080-5A99-11D5-B1FD-00A0C9E23A58}C_REGISTER_REG_COUNT" "50" \r
 "{D595F9C0-EF22-11D5-B7DB-0000E10B3DA9}EventCtrlViews" "0" \r
 "{EEDC9300-6FBE-11D5-8613-00A024591A38}LocalsCtrlViews" "0" \r
 0 \r
 [WINDOW_POSITION_STATE_DATA_VD1]\r
 "Help" "TOOLBAR 0" 59419 1 5 "0.00" 0 0 0 0 0 17 0 "" "0.0" \r
-"{WK_00000001_CmdLine}RTOSDemoSessionSH7216_E10A-USB_SYSTEM__SH" "WINDOW" 59422 0 1 "0.08" 219 0 0 350 200 18 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0" \r
-"{WK_00000001_DISASSEMBLY}" "WINDOW" 0 0 0 "0.00" 0 -4 -23 1400 586 9 0 "" "0.0" \r
+"{WK_00000001_CmdLine}RTOSDemoSessionSH7216_E10A-USB_SYSTEM__SH" "WINDOW" 59422 0 1 "0.23" 219 0 0 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0" \r
+"{WK_00000001_DISASSEMBLY}" "WINDOW" 0 0 0 "0.00" 0 -4 -23 892 659 9 0 "" "0.0" \r
 "{WK_00000001_EVENT}RTOSDemoSessionSH7216_E10A-USB_SYSTEM__SH" "WINDOW" 59422 0 0 "0.50" 292 0 0 350 200 2065 0 "32774|32775|32777|<<separator>>|32780|<<separator>>" "0.0" \r
 "{WK_00000001_IO}RTOSDemoSessionSH7216_E10A-USB_SYSTEM__SH" "WINDOW" 59422 0 3 "0.31" 219 0 0 350 200 17 0 "32817|32826|32819|32820|32821" "0.0" \r
-"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 2 "0.92" 219 560 340 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" \r
-"{WK_00000001_REGISTERS}RTOSDemoSessionSH7216_E10A-USB_SYSTEM__SH" "WINDOW" 59421 0 0 "1.00" 293 0 0 350 200 18 0 "" "0.0" \r
+"{WK_00000001_MEMORY}RTOSDemoSessionSH7216_E10A-USB_SYSTEM__SH" "WINDOW" 59422 0 0 "0.60" 219 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" \r
+"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 2 "0.73" 219 560 340 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0" \r
+"{WK_00000001_REGISTERS}RTOSDemoSessionSH7216_E10A-USB_SYSTEM__SH" "WINDOW" 59421 0 0 "1.00" 265 0 0 350 200 18 0 "" "0.0" \r
+"{WK_00000001_STACKTRACE}RTOSDemoSessionSH7216_E10A-USB_SYSTEM__SH" "WINDOW" 59422 0 0 "0.50" 219 0 0 350 200 2065 0 "" "0.0" \r
 "{WK_00000001_STATUS}RTOSDemoSessionSH7216_E10A-USB_SYSTEM__SH" "WINDOW" 59422 0 4 "0.50" 219 0 0 350 200 17 0 "" "0.0" \r
-"{WK_00000001_WATCH}RTOSDemoSessionSH7216_E10A-USB_SYSTEM__SH" "WINDOW" 59422 0 0 "0.50" 219 0 0 350 200 17 0 "32781|32783|<<separator>>|32771|32829|32772|32827|32773|<<separator>>|32786|<<separator>>|32810|32811|32831" "0.0" \r
+"{WK_00000001_WATCH}RTOSDemoSessionSH7216_E10A-USB_SYSTEM__SH" "WINDOW" 59422 0 0 "0.27" 219 0 0 350 200 18 0 "32781|32783|<<separator>>|32771|32829|32772|32827|32773|<<separator>>|32786|<<separator>>|32810|32811|32831" "0.0" \r
 "{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 340 560 340 350 200 18 0 "" "0.0" \r
 "{WK_TB00000001_STANDARD}" "TOOLBAR 0" 59419 0 2 "0.00" 0 0 0 0 0 18 0 "" "0.0" \r
 "{WK_TB00000002_EDITOR}" "TOOLBAR 0" 59419 0 0 "0.00" 0 0 0 0 0 18 0 "" "0.0" \r
 [WINDOW_POSITION_STATE_DATA_VD3]\r
 [WINDOW_POSITION_STATE_DATA_VD4]\r
 [WINDOW_Z_ORDER]\r
-"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\regtest.src" \r
-"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\portasm.src" \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\main.c" \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Source\tasks.c" \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\portasm.src" \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\FreeRTOSConfig.h" \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\PollQ.c" \r
 "C:\E\Dev\FreeRTOS\WorkingCopy\Source\portable\Renesas\SH2A_FPU\port.c" \r
-"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\vecttbl.c" \r
+"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\SuperH_SH7216_Renesas\RTOSDemo\intprg.c" \r
 [TARGET_NAME]\r
 "SH7216 E10A-USB SYSTEM (SH2A-FPU)" "" 0 \r
 [STATUSBAR_STATEINFO_VD1]\r
 [FLASH_DETAILS]\r
 "" 0 0 "" 0 "" 0 0 "" 0 0 0 0 0 0 0 "" "" "" "" "" \r
 [BREAKPOINTS]\r
-"c:\e\dev\freertos\workingcopy\demo\superh_sh7216_renesas\rtosdemo\regtest.src" 89 7808 1 "{00000000-0000-0000-C000-000000000046}" "" \r
 [END]\r
index e5fee0dce90cbdbbad2705d2db755c006e97f11e..e86918037e79b13797f4d1a270936941150f671e 100644 (file)
 #pragma section IntPRG\r
 \r
 // 4 Illegal code\r
-void INT_Illegal_code(void){for( ;; ); /* sleep(); */}\r
+#pragma interrupt (INT_Illegal_code)\r
+void INT_Illegal_code(void)\r
+{\r
+volatile int i = 0;\r
+\r
+       while( i == 0 );\r
+}\r
+\r
 // 5 Reserved\r
 \r
 // 6 Illegal slot\r
index 758a85cacca0db6b3ecc0378f855a4790c7e6cab..37049b364eeb0ebadbdaf88fe24ebbb0237fca50 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V6.0.1 - Copyright (C) 2009 Real Time Engineers Ltd.\r
+    FreeRTOS V6.0.2 - Copyright (C) 2009 Real Time Engineers Ltd.\r
 \r
     ***************************************************************************\r
     *                                                                         *\r
     licensing and training services.\r
 */\r
 \r
+/* Kernel includes. */\r
 #include "FreeRTOS.h"\r
 #include "task.h"\r
 \r
+/* Demo application includes. */\r
+#include "BlockQ.h"\r
+#include "death.h"\r
+#include "integer.h"\r
+#include "blocktim.h"\r
+#include "flash.h"\r
 #include "partest.h"\r
+#include "semtest.h"\r
+#include "PollQ.h"\r
+#include "GenQTest.h"\r
+#include "QPeek.h"\r
+#include "recmutex.h"\r
 \r
+/* Constants required to configure the hardware. */\r
 #define mainFRQCR_VALUE                                        ( 0x0303 )      /* Input = 12.5MHz, I Clock = 200MHz, B Clock = 50MHz, P Clock = 50MHz */\r
 \r
+/* Task priorities. */\r
+#define mainQUEUE_POLL_PRIORITY                                ( tskIDLE_PRIORITY + 1 )\r
+#define mainCHECK_TASK_PRIORITY                                ( tskIDLE_PRIORITY + 3 )\r
+#define mainSEM_TEST_PRIORITY                          ( tskIDLE_PRIORITY + 1 )\r
+#define mainBLOCK_Q_PRIORITY                           ( tskIDLE_PRIORITY + 2 )\r
+#define mainCREATOR_TASK_PRIORITY           ( tskIDLE_PRIORITY + 3 )\r
+#define mainFLASH_TASK_PRIORITY                                ( tskIDLE_PRIORITY + 1 )\r
+#define mainINTEGER_TASK_PRIORITY           ( tskIDLE_PRIORITY )\r
+#define mainGEN_QUEUE_TASK_PRIORITY                    ( tskIDLE_PRIORITY )\r
+\r
+/* The LED toggle by the check task. */\r
+#define mainCHECK_LED                                          ( 5 )\r
+\r
+/* The rate at which mainCHECK_LED will toggle when all the tasks are running\r
+without error. */\r
+#define mainNO_ERROR_CYCLE_TIME                                ( 5000 / portTICK_RATE_MS )\r
+\r
+/* The rate at which mainCHECK_LED will toggle when an error has been reported\r
+by at least one task. */\r
+#define mainERROR_CYCLE_TIME                           ( 200 / portTICK_RATE_MS )\r
+\r
 void vApplicationMallocFailedHook( void );\r
 void vApplicationIdleHook( void );\r
 static void prvSetupHardware( void );\r
+static void prvCheckTask( void *pvParameters );\r
 \r
 extern void vRegTest1Task( void *pvParameters );\r
 extern void vRegTest2Task( void *pvParameters );\r
 \r
-unsigned long ulRegTest1CycleCount = 0UL, ulRegTest2CycleCount = 0UL;\r
+volatile unsigned long ulRegTest1CycleCount = 0UL, ulRegTest2CycleCount = 0UL;\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -73,15 +108,116 @@ void main(void)
 {\r
        prvSetupHardware();\r
 \r
-       xTaskCreate( vRegTest1Task, "RegTest1", configMINIMAL_STACK_SIZE, ( void * ) 0x12345678UL, 1, NULL );\r
-       xTaskCreate( vRegTest2Task, "RegTest2", configMINIMAL_STACK_SIZE, ( void * ) 0x11223344UL, 1, NULL );\r
-        \r
+       /* Start the reg test tasks which test the context switching mechanism. */\r
+       xTaskCreate( vRegTest1Task, "RegTest1", configMINIMAL_STACK_SIZE, ( void * ) 0x12345678UL, tskIDLE_PRIORITY, NULL );\r
+       xTaskCreate( vRegTest2Task, "RegTest2", configMINIMAL_STACK_SIZE, ( void * ) 0x11223344UL, tskIDLE_PRIORITY, NULL );\r
+\r
+       /* Start the check task as described at the top of this file. */\r
+       xTaskCreate( prvCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
+\r
+       /* Start the standard demo tasks.  These don't perform any particular useful\r
+       functionality, other than to demonstrate the FreeRTOS API being used. */\r
+       vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );\r
+       vCreateBlockTimeTasks();\r
+    vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );\r
+    vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );\r
+    vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );\r
+    vStartGenericQueueTasks( mainGEN_QUEUE_TASK_PRIORITY );\r
+       vStartLEDFlashTasks( mainFLASH_TASK_PRIORITY );\r
+    vStartQueuePeekTasks();\r
+    vStartRecursiveMutexTasks();\r
+\r
+       /* The suicide tasks must be created last as they need to know how many\r
+       tasks were running prior to their creation in order to ascertain whether\r
+       or not the correct/expected number of tasks are running at any given time. */\r
+//    vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );\r
+\r
+       /* Start the tasks running. */\r
        vTaskStartScheduler();\r
 \r
+       /* Will only get here if there was insufficient heap memory to create the idle\r
+    task.  Increase the configTOTAL_HEAP_SIZE setting in FreeRTOSConfig.h. */\r
        for( ;; );\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
+static void prvCheckTask( void *pvParameter )\r
+{\r
+portTickType xNextWakeTime, xCycleFrequency = mainNO_ERROR_CYCLE_TIME;\r
+unsigned long ulLastRegTest1CycleCount = 0UL, ulLastRegTest2CycleCount = 0UL;\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, xCycleFrequency );\r
+               \r
+               /* Inspect all the other tasks to esnure none have experienced any errors. */\r
+               if( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
+               {\r
+                       /* Increase the rate at which this task cycles, which will increase the\r
+                       rate at which mainCHECK_LED flashes to give visual feedback that an error\r
+                       has occurred. */\r
+                       xCycleFrequency = mainERROR_CYCLE_TIME;\r
+               }\r
+               else if( xAreQueuePeekTasksStillRunning() != pdTRUE )\r
+               {\r
+                       xCycleFrequency = mainERROR_CYCLE_TIME;\r
+               }\r
+               else if( xAreBlockingQueuesStillRunning() != pdTRUE )\r
+               {\r
+                       xCycleFrequency = mainERROR_CYCLE_TIME;\r
+               }\r
+               else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
+               {\r
+                       xCycleFrequency = mainERROR_CYCLE_TIME;\r
+               }\r
+           else if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
+           {\r
+               xCycleFrequency = mainERROR_CYCLE_TIME;\r
+           }\r
+           else if( xArePollingQueuesStillRunning() != pdTRUE )\r
+           {\r
+               xCycleFrequency = mainERROR_CYCLE_TIME;\r
+           }\r
+//         else if( xIsCreateTaskStillRunning() != pdTRUE )\r
+//         {\r
+//             xCycleFrequency = mainERROR_CYCLE_TIME;\r
+//         }\r
+           else if( xAreIntegerMathsTaskStillRunning() != pdTRUE )\r
+           {\r
+               xCycleFrequency = mainERROR_CYCLE_TIME;\r
+           }\r
+           else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
+           {\r
+               xCycleFrequency = mainERROR_CYCLE_TIME;\r
+           }\r
+\r
+               /* Check the reg test tasks are still cycling.  They will stop incrementing\r
+               their loop counters if they encounter an error. */\r
+               if( ulRegTest1CycleCount == ulLastRegTest1CycleCount )\r
+               {\r
+                       xCycleFrequency = mainERROR_CYCLE_TIME;\r
+               }\r
+\r
+               if( ulRegTest2CycleCount == ulLastRegTest2CycleCount )\r
+               {\r
+                       xCycleFrequency = mainERROR_CYCLE_TIME;\r
+               }\r
+               \r
+               ulLastRegTest1CycleCount = ulRegTest1CycleCount;\r
+               ulLastRegTest2CycleCount = ulRegTest2CycleCount;\r
+               \r
+               /* Toggle the check LED to give an indication of the system status.  If the\r
+               LED toggles every 5 seconds then everything is ok.  A faster toggle indicates\r
+               an error. */\r
+               vParTestToggleLED( mainCHECK_LED );\r
+       }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
 void vApplicationMallocFailedHook( void )\r
 {\r
        /* A call to vPortMalloc() failed, probably during the creation of a task,\r
@@ -100,6 +236,12 @@ void vApplicationIdleHook( void )
 }\r
 /*-----------------------------------------------------------*/\r
 \r
+void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
+{\r
+       for( ;; );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
 static void prvSetupHardware( void )\r
 {\r
 volatile unsigned long ul;\r
@@ -154,25 +296,8 @@ unsigned long ulCompareMatch = ( configPERIPHERAL_CLOCK_HZ / ( configTICK_RATE_H
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-void INT_CMT_CMI0( void )\r
+void vApplicationTickHook( void )\r
 {\r
-static unsigned long ul = 0;\r
-\r
-       ul++;\r
-       if( ul >= 1000 )\r
-       {\r
-               if( PE.DR.WORD & ( 0x01 << 9 ) )\r
-               {\r
-                       PE.DR.WORD &= ~( 0x01 << 9 );\r
-               }\r
-               else\r
-               {\r
-                       PE.DR.WORD |= ( 0x01 << 9 );\r
-               }\r
-               \r
-               ul = 0;\r
-       }\r
-\r
        CMT0.CMCSR.BIT.CMF = 0;\r
 }\r
 /*-----------------------------------------------------------*/\r
index 0cf566dbcb925d5a907f109585b4d52c9d760abb..378484ea2bdb2b0cc3574fcd00b35433ea63adab 100644 (file)
@@ -1,5 +1,5 @@
 ;/*\r
-;    FreeRTOS V6.0.1 - Copyright (C) 2009 Real Time Engineers Ltd.\r
+;    FreeRTOS V6.0.2 - Copyright (C) 2009 Real Time Engineers Ltd.\r
 ;\r
 ;    ***************************************************************************\r
 ;    *                                                                         *\r
        .export _vRegTest1Task\r
        .export _vRegTest2Task\r
 \r
-    .section    P\r
+    .section    P, code, align=4\r
+       \r
+       \r
+_vRegTest1Error:\r
+       bra             _vRegTest1Error \r
+       nop\r
+\r
+;-----------------------------------------------------------\r
        \r
 _vRegTest1Task:\r
 \r
+       ; Fill the registers with known values.\r
        mov             #3, r2\r
        mov             #4, r3\r
        mov             #5, r4\r
@@ -85,92 +93,212 @@ _vRegTest1Task:
        \r
 _vRegTest1Loop:\r
 \r
+       ; Perform a yield, just for extra test coverage.\r
+       trapa   #33\r
+       \r
        ; Reset r1 which was used in the tests.\r
        mov             #2, r1\r
-       \r
+\r
+       ; Test that the registers still contain the expected values.  If not, jump to\r
+       ; vRegTestError, which will stop this function looping and so cause it to stop\r
+       ; incrementing its loop counter.        \r
        mov             #2, r0\r
        cmp/eq  r0, r1\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
        \r
        mov             #3, r0\r
        cmp/eq  r0, r2\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        mov             #4, r0\r
        cmp/eq  r0, r3\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        mov             #5, r0\r
        cmp/eq  r0, r4\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        mov             #6, r0\r
        cmp/eq  r0, r5\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        mov             #7, r0\r
        cmp/eq  r0, r6\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        mov             #8, r0\r
        cmp/eq  r0, r7\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        mov             #9, r0\r
        cmp/eq  r0, r8\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        mov             #10, r0\r
        cmp/eq  r0, r9\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        mov             #11, r0\r
        cmp/eq  r0, r10\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        mov             #12, r0\r
        cmp/eq  r0, r11\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        mov             #13, r0\r
        cmp/eq  r0, r12\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        mov             #14, r0\r
        cmp/eq  r0, r13\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        sts             macl, r0\r
        mov             #15, r1\r
        cmp/eq  r0, r1\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        sts             mach, r0\r
        mov             #16, r1\r
        cmp/eq  r0, r1\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
        stc             gbr, r0\r
        mov             #17, r1\r
        cmp/eq  r0, r1\r
-       bf              _vRegTestError\r
+       bf              _vRegTest1Error\r
 \r
+       ; Increment the loop counter to indicate that this task is still running and\r
+       ; still healthy.\r
        mov.l   #_ulRegTest1CycleCount, r0\r
        mov.l   @r0, r1\r
        add             #1, r1\r
        mov.l   r1, @r0\r
 \r
-       bra             _vRegTest1Task\r
+       ; Jump back to test all the registers again.\r
+       bra             _vRegTest1Loop\r
        nop\r
 \r
+;-----------------------------------------------------------\r
+\r
+_vRegTest2Error:\r
+\r
+       bra             _vRegTest2Error\r
+       nop     \r
+\r
+;-----------------------------------------------------------\r
+\r
 _vRegTest2Task:\r
 \r
-       trapa   #33\r
-       bra             _vRegTest2Task\r
-       nop\r
+       ; Fill the registers with known values.\r
+       mov             #13, r2\r
+       mov             #14, r3\r
+       mov             #15, r4\r
+       mov             #16, r5\r
+       mov             #17, r6\r
+       mov             #18, r7\r
+       mov             #19, r8\r
+       mov             #110, r9\r
+       mov             #111, r10\r
+       mov             #112, r11\r
+       mov             #113, r12\r
+       mov             #114, r13\r
+\r
+       mov             #115, r0\r
+       lds             r0, macl\r
+       mov             #116, r0\r
+       lds             r0, mach\r
+       mov             #117, r0\r
+       ldc             r0, gbr\r
        \r
-_vRegTestError:\r
-       bra             _vRegTestError\r
+_vRegTest2Loop:\r
+\r
+       ; Reset r1 which was used in the tests.\r
+       mov             #12, r1\r
+\r
+       ; Test that the registers still contain the expected values.  If not, jump to\r
+       ; vRegTestError, which will stop this function looping and so cause it to stop\r
+       ; incrementing its loop counter.        \r
+       mov             #12, r0\r
+       cmp/eq  r0, r1\r
+       bf              _vRegTest2Error\r
+       \r
+       mov             #13, r0\r
+       cmp/eq  r0, r2\r
+       bf              _vRegTest2Error\r
+\r
+       mov             #14, r0\r
+       cmp/eq  r0, r3\r
+       bf              _vRegTest2Error\r
+\r
+       mov             #15, r0\r
+       cmp/eq  r0, r4\r
+       bf              _vRegTest2Error\r
+\r
+       mov             #16, r0\r
+       cmp/eq  r0, r5\r
+       bf              _vRegTest2Error\r
+\r
+       mov             #17, r0\r
+       cmp/eq  r0, r6\r
+       bf              _vRegTest2Error\r
+\r
+       mov             #18, r0\r
+       cmp/eq  r0, r7\r
+       bf              _vRegTest2Error\r
+\r
+       mov             #19, r0\r
+       cmp/eq  r0, r8\r
+       bf              _vRegTest2Error\r
+\r
+       mov             #110, r0\r
+       cmp/eq  r0, r9\r
+       bf              _vRegTest2Error\r
+\r
+       mov             #111, r0\r
+       cmp/eq  r0, r10\r
+       bf              _vRegTest2Error\r
+\r
+       mov             #112, r0\r
+       cmp/eq  r0, r11\r
+       bf              _vRegTest2Error\r
+\r
+       mov             #113, r0\r
+       cmp/eq  r0, r12\r
+       bf              _vRegTest2Error\r
+\r
+       mov             #114, r0\r
+       cmp/eq  r0, r13\r
+       bf              _vRegTest2Error\r
+\r
+       sts             macl, r0\r
+       mov             #115, r1\r
+       cmp/eq  r0, r1\r
+       bf              _vRegTest2Error\r
+\r
+       sts             mach, r0\r
+       mov             #116, r1\r
+       cmp/eq  r0, r1\r
+       bf              _vRegTest2Error\r
+\r
+       stc             gbr, r0\r
+       mov             #117, r1\r
+       cmp/eq  r0, r1\r
+       bf              _vRegTest2Error\r
+\r
+       ; Increment the loop counter to indicate that this task is still running and\r
+       ; still healthy.\r
+       mov.l   #_ulRegTest2CycleCount, r0\r
+       mov.l   @r0, r1\r
+       add             #1, r1\r
+       mov.l   r1, @r0\r
+\r
+       ; Jump back to test all the registers again.\r
+       bra             _vRegTest2Loop\r
+       nop\r
+\r
+\r
 \r
        .end\r
                \r
index a0f18d465e80222055d557f9b626362b03b8ad87..dc8cb9d3a66c88930a39e8828ba059d0fc4f7f74 100644 (file)
@@ -15,6 +15,7 @@
 \r
 extern void vPortStartFirstTask( void );\r
 extern void vPortYield( void );\r
+extern void vPortPreemptiveTick( void );\r
 \r
 #pragma section VECTTBL\r
 \r
@@ -310,7 +311,8 @@ void *INT_Vectors[] = {
 // 139 Reserved\r
     (void*) Dummy,\r
 // 140 CMT CMI0\r
-       (void*) INT_CMT_CMI0,\r
+//     (void*) INT_CMT_CMI0,\r
+       (void*) vPortPreemptiveTick,\r
 // 141 Reserved\r
     (void*) Dummy,\r
 // 142 Reserved\r