]> git.sur5r.net Git - freertos/commitdiff
Some updates to the fledgling RL78 demo application. Not yet complete.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 6 Sep 2011 16:11:48 +0000 (16:11 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 6 Sep 2011 16:11:48 +0000 (16:11 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1586 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/RL78_RL78G13_Promo_Board_IAR/FreeRTOSConfig.h
Demo/RL78_RL78G13_Promo_Board_IAR/RTOSDemo.ewp
Demo/RL78_RL78G13_Promo_Board_IAR/main.c
Demo/RL78_RL78G13_Promo_Board_IAR/settings/rtosdemo.dbgdt
Demo/RL78_RL78G13_Promo_Board_IAR/settings/rtosdemo.dni
Demo/RL78_RL78G13_Promo_Board_IAR/settings/rtosdemo.wsdt

index 67505518b3b37a70367b029c109384e472c37d94..6e841b0073ae005d48f8a154a6615f3487470d83 100644 (file)
@@ -88,19 +88,19 @@ asm file.  It is valid in a C file, but not valid in an asm file. */
 #endif /* __IAR_SYSTEMS_ICC__ */\r
 \r
 #define configUSE_PREEMPTION                   1\r
-#define configTICK_RATE_HZ                             ( ( portTickType ) 1000 )\r
+#define configTICK_RATE_HZ                             ( ( unsigned short ) 1000 )\r
 #define configMAX_PRIORITIES                   ( ( unsigned portBASE_TYPE ) 4 )\r
 #define configMINIMAL_STACK_SIZE               ( ( unsigned short ) 100 )\r
 #define configMAX_TASK_NAME_LEN                        ( 10 )\r
 #define configUSE_TRACE_FACILITY               0\r
 #define configUSE_16_BIT_TICKS                 1\r
 #define configIDLE_SHOULD_YIELD                        1\r
-#define configTOTAL_HEAP_SIZE                  ( (size_t ) ( 2900 ) )\r
+#define configTOTAL_HEAP_SIZE                  ( (size_t ) ( 3500 ) )\r
 #define configCHECK_FOR_STACK_OVERFLOW 2\r
 #define configUSE_MUTEXES                              1\r
 \r
 /* Hook function definitions. */\r
-#define configUSE_IDLE_HOOK                            0\r
+#define configUSE_IDLE_HOOK                            1\r
 #define configUSE_TICK_HOOK                            0\r
 #define configUSE_MALLOC_FAILED_HOOK   1\r
 \r
index d7784ff7494886c8c3dc239d664100a5fe5d2ebb..0b30add33296bc94b46b0e2559e5e41e7de67b9b 100644 (file)
         <option>\r
           <name>GenLibOutFormatter</name>\r
           <version>0</version>\r
-          <state>2</state>\r
+          <state>3</state>\r
         </option>\r
         <option>\r
           <name>GenLibOutFormatterDescription</name>\r
-          <state>No specifier a or A, no specifier n, no float.</state>\r
+          <state>No specifier a or A, no specifier n, no float, no flags.</state>\r
         </option>\r
         <option>\r
           <name>GenStackSize</name>\r
         </option>\r
         <option>\r
           <name>GenNearHeapSize</name>\r
-          <state>256</state>\r
+          <state>0</state>\r
         </option>\r
         <option>\r
           <name>GenFarHeapSize</name>\r
     <name>Demo Source</name>\r
     <group>\r
       <name>StandardDemos</name>\r
-      <file>\r
-        <name>$PROJ_DIR$\..\Common\Minimal\blocktim.c</name>\r
-      </file>\r
       <file>\r
         <name>$PROJ_DIR$\..\Common\Minimal\dynamic.c</name>\r
       </file>\r
-      <file>\r
-        <name>$PROJ_DIR$\..\Common\Minimal\GenQTest.c</name>\r
-      </file>\r
       <file>\r
         <name>$PROJ_DIR$\..\Common\Minimal\PollQ.c</name>\r
       </file>\r
index 49d502d36a098b96b871313266dd41225d154f0c..495e18a6393df4dda64ff0eebe7722ec4055e6b4 100644 (file)
@@ -68,6 +68,8 @@
 \r
 /* Standard demo includes. */\r
 #include "dynamic.h"\r
+#include "PollQ.h"\r
+#include "semtest.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
@@ -139,6 +141,8 @@ short main( void )
        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
+       vStartSemaphoreTasks( tskIDLE_PRIORITY + 1U );\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
@@ -175,6 +179,16 @@ static portBASE_TYPE xChangedTimerPeriodAlready = pdFALSE, xErrorStatus = pdPASS
        {\r
                xErrorStatus = pdFAIL;\r
        }\r
+       \r
+       if( xArePollingQueuesStillRunning() != pdTRUE )\r
+       {\r
+               xErrorStatus = pdFAIL;\r
+       }\r
+       \r
+       if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
+       {\r
+               xErrorStatus = pdFAIL;\r
+       }\r
 \r
        if( sRegTestStatus != pdPASS )\r
        {\r
@@ -310,3 +324,19 @@ void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName
        taskDISABLE_INTERRUPTS();\r
        for( ;; );\r
 }\r
+/*-----------------------------------------------------------*/\r
+\r
+void vApplicationIdleHook( void )\r
+{\r
+volatile size_t xFreeHeapSpace;\r
+\r
+       /* This is just a trivial example of an idle hook.  It is called on each\r
+       cycle of the idle task.  It must *NOT* attempt to block.  In this case the\r
+       idle task just queries the amount of FreeRTOS heap that remains.  See the\r
+       memory management section on the http://www.FreeRTOS.org web site for memory\r
+       management options.  If there is a lot of heap memory free then the\r
+       configTOTAL_HEAP_SIZE value in FreeRTOSConfig.h can be reduced to free up\r
+       RAM. */\r
+       xFreeHeapSpace = xPortGetFreeHeapSize();        \r
+}\r
+\r
index dc7c2273216cd27d60be59b6f6f1f91bb63b4120..f14f3318179e465be01198baddcb8cd840323eaf 100644 (file)
@@ -31,7 +31,7 @@
       \r
       \r
       \r
-    <Wnd2>\r
+    <Wnd0>\r
         <Tabs>\r
           <Tab>\r
             <Identity>TabID-30626-17561</Identity>\r
@@ -47,7 +47,7 @@
           </Tab>\r
         </Tabs>\r
         \r
-      <SelectedTab>0</SelectedTab></Wnd2><Wnd3>\r
+      <SelectedTab>0</SelectedTab></Wnd0><Wnd1>\r
         <Tabs>\r
           <Tab>\r
             <Identity>TabID-8606-17564</Identity>\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/StandardDemos</ExpandedNode></NodeDict></Session>\r
           </Tab>\r
         </Tabs>\r
         \r
-      <SelectedTab>0</SelectedTab></Wnd3></Windows>\r
+      <SelectedTab>0</SelectedTab></Wnd1></Windows>\r
     <Editor>\r
       \r
       \r
       \r
       \r
-    <Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>123</YPos><SelStart>6138</SelStart><SelEnd>6138</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\include\portable.h</Filename><XPos>0</XPos><YPos>41</YPos><SelStart>9284</SelStart><SelEnd>9284</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\tasks.c</Filename><XPos>0</XPos><YPos>455</YPos><SelStart>20208</SelStart><SelEnd>20208</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>95</YPos><SelStart>5356</SelStart><SelEnd>5356</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\RL78\port.c</Filename><XPos>0</XPos><YPos>6</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\queue.c</Filename><XPos>0</XPos><YPos>20</YPos><SelStart>2846</SelStart><SelEnd>2846</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\RL78\portasm.s87</Filename><XPos>0</XPos><YPos>35</YPos><SelStart>2965</SelStart><SelEnd>2965</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\include\FreeRTOS.h</Filename><XPos>0</XPos><YPos>118</YPos><SelStart>6432</SelStart><SelEnd>6476</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\RL78\portmacro.h</Filename><XPos>0</XPos><YPos>51</YPos><SelStart>3711</SelStart><SelEnd>3711</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\list.c</Filename><XPos>0</XPos><YPos>30</YPos><SelStart>0</SelStart><SelEnd>3157</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\RegTest.s87</Filename><XPos>0</XPos><YPos>183</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\Common\Minimal\dynamic.c</Filename><XPos>0</XPos><YPos>344</YPos><SelStart>14819</SelStart><SelEnd>14819</SelEnd></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>157</YPos><SelStart>10672</SelStart><SelEnd>10672</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\Common\Minimal\semtest.c</Filename><XPos>0</XPos><YPos>248</YPos><SelStart>11198</SelStart><SelEnd>11228</SelEnd></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-013361d0><key>iaridepm.enu1</key></Toolbar-013361d0></Sizes></Row0><Row1><Sizes><Toolbar-04b9a7e8><key>debuggergui.enu1</key></Toolbar-04b9a7e8><Toolbar-0b7be258><key>rl78ocd.enu1</key></Toolbar-0b7be258></Sizes></Row1></Top><Left><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>662</Bottom><Right>344</Right><x>-2</x><y>-2</y><xscreen>346</xscreen><yscreen>254</yscreen><sizeHorzCX>205952</sizeHorzCX><sizeHorzCY>258656</sizeHorzCY><sizeVertCX>205952</sizeVertCX><sizeVertCY>676171</sizeVertCY></Rect></Wnd3></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>252</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>254</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>258656</sizeHorzCY><sizeVertCX>205952</sizeVertCX><sizeVertCY>258656</sizeVertCY></Rect></Wnd2></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>\r
+    <Top><Row0><Sizes><Toolbar-013362c8><key>iaridepm.enu1</key></Toolbar-013362c8></Sizes></Row0><Row1><Sizes><Toolbar-04c02860><key>debuggergui.enu1</key></Toolbar-04c02860><Toolbar-08707c28><key>rl78ocd.enu1</key></Toolbar-08707c28></Sizes></Row1><Row2><Sizes/></Row2><Row3><Sizes/></Row3><Row4><Sizes/></Row4><Row5><Sizes/></Row5><Row6><Sizes/></Row6></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>662</Bottom><Right>344</Right><x>-2</x><y>-2</y><xscreen>346</xscreen><yscreen>254</yscreen><sizeHorzCX>205952</sizeHorzCX><sizeHorzCY>258656</sizeHorzCY><sizeVertCX>205952</sizeVertCX><sizeVertCY>676171</sizeVertCY></Rect></Wnd1></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>252</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>254</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>258656</sizeHorzCY><sizeVertCX>205952</sizeVertCX><sizeVertCY>258656</sizeVertCY></Rect></Wnd0></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>\r
   </Desktop>\r
 </Project>\r
 \r
index 841fe4beeb43f1b12b252a9c62789a9e9fdb520d..f1f403d76dd745e1ee33f28ebd33b3201a3dca27 100644 (file)
@@ -15,7 +15,7 @@ TypeViolation=1
 UnspecRange=1\r
 ActionState=1\r
 [DebugChecksum]\r
-Checksum=-445921582\r
+Checksum=-185012109\r
 [DisAssemblyWindow]\r
 NumStates=_ 1\r
 State 1=_ 1\r
index 3732f78d1c6e4b88a903d49c3088d17ea8d4a373..670b6fff63171e2336c03324fd4e3a08b2289f77 100644 (file)
@@ -25,7 +25,7 @@
             <Factory>Workspace</Factory>\r
             <Session>\r
               \r
-            <NodeDict><ExpandedNode>RTOSDemo</ExpandedNode><ExpandedNode>RTOSDemo/Demo Source</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></NodeDict></Session>\r
           </Tab>\r
         </Tabs>\r
         \r
       \r
       \r
       \r
-    <Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>123</YPos><SelStart>6138</SelStart><SelEnd>6138</SelEnd></Tab><ActiveTab>0</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>157</YPos><SelStart>10672</SelStart><SelEnd>10672</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\Common\Minimal\semtest.c</Filename><XPos>0</XPos><YPos>248</YPos><SelStart>11198</SelStart><SelEnd>11228</SelEnd></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-013361d0><key>iaridepm.enu1</key></Toolbar-013361d0></Sizes></Row0><Row1><Sizes/></Row1><Row2><Sizes/></Row2><Row3><Sizes/></Row3><Row4><Sizes/></Row4><Row5><Sizes/></Row5><Row6><Sizes/></Row6></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>629</Bottom><Right>318</Right><x>-2</x><y>-2</y><xscreen>263</xscreen><yscreen>200</yscreen><sizeHorzCX>156548</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>190476</sizeVertCX><sizeVertCY>642566</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>309</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>311</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>316701</sizeHorzCY><sizeVertCX>205357</sizeVertCX><sizeVertCY>258656</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>\r
+    <Top><Row0><Sizes><Toolbar-013362c8><key>iaridepm.enu1</key></Toolbar-013362c8></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>629</Bottom><Right>318</Right><x>-2</x><y>-2</y><xscreen>263</xscreen><yscreen>200</yscreen><sizeHorzCX>156548</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>190476</sizeVertCX><sizeVertCY>642566</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>309</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>311</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>316701</sizeHorzCY><sizeVertCX>205357</sizeVertCX><sizeVertCY>258656</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>\r
   </Desktop>\r
 </Workspace>\r
 \r