]> git.sur5r.net Git - freertos/commitdiff
Tidy up the IAR SmartFusion demo reading for release.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 28 Apr 2011 15:13:30 +0000 (15:13 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 28 Apr 2011 15:13:30 +0000 (15:13 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1397 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/CORTEX_A2F200_IAR_and_Keil/FreeRTOSConfig.h
Demo/CORTEX_A2F200_IAR_and_Keil/RTOSDemo_IAR.ewd
Demo/CORTEX_A2F200_IAR_and_Keil/RTOSDemo_IAR.ewp
Demo/CORTEX_A2F200_IAR_and_Keil/WebServer/httpd-cgi.c
Demo/CORTEX_A2F200_IAR_and_Keil/main-blinky.c
Demo/CORTEX_A2F200_IAR_and_Keil/main-full.c
Demo/CORTEX_A2F200_IAR_and_Keil/uIP_Task.c

index 1afb6e2483f0f919d61196f35a6205c7248bf8fa..17a636d40b46ff88ab9f9223d7738630183a52fd 100644 (file)
 */\r
 \r
 \r
-/* The following #error directive is to remind users that a batch file must be\r
- * executed prior to this project being built.  The batch file *cannot* be\r
- * executed from within CCS4!  Once it has been executed, re-open or refresh\r
- * the CCS4 project and remove the #error line below.\r
- */\r
-//#error Ensure CreateProjectDirectoryStructure.bat has been executed before building.  See comment immediately above.\r
-\r
-\r
 #ifndef FREERTOS_CONFIG_H\r
 #define FREERTOS_CONFIG_H\r
 \r
index e08d2117631a4ecb7a4bf5ec676877702b9dc51b..ab5cf1b24d5fb41487efadc5bbc0a87da79778a5 100644 (file)
     </debuggerPlugins>\r
   </configuration>\r
   <configuration>\r
-    <name>Full-with-optimisation</name>\r
+    <name>Full_with_optimisation</name>\r
     <toolchain>\r
       <name>ARM</name>\r
     </toolchain>\r
index d5dbf4de7ba309e12560d469e5962ae6ecbfc61a..72f633045c718e69ebb321a724d689e02c2bea6f 100644 (file)
           <state>$PROJ_DIR$/MicroSemi_Code/CMSIS</state>\r
           <state>$PROJ_DIR$/MicroSemi_Code/drivers/mss_gpio</state>\r
           <state>$PROJ_DIR$/MicroSemi_Code/drivers/mss_watchdog</state>\r
+          <state>$PROJ_DIR$/MicroSemi_Code/drivers/mss_ace</state>\r
+          <state>$PROJ_DIR$/MicroSemi_Code/drivers_config/mss_ace</state>\r
           <state>$PROJ_DIR$/WebServer</state>\r
           <state>$PROJ_DIR$/../Common/ethernet/FreeTCPIP/apps/httpd</state>\r
           <state>$PROJ_DIR$/../Common/ethernet/FreeTCPIP</state>\r
     </settings>\r
   </configuration>\r
   <configuration>\r
-    <name>Full-with-optimisation</name>\r
+    <name>Full_with_optimisation</name>\r
     <toolchain>\r
       <name>ARM</name>\r
     </toolchain>\r
         <debug>1</debug>\r
         <option>\r
           <name>ExePath</name>\r
-          <state>Full-with-optimisation\Exe</state>\r
+          <state>Full_with_optimisation\Exe</state>\r
         </option>\r
         <option>\r
           <name>ObjPath</name>\r
-          <state>Full-with-optimisation\Obj</state>\r
+          <state>Full_with_optimisation\Obj</state>\r
         </option>\r
         <option>\r
           <name>ListPath</name>\r
-          <state>Full-with-optimisation\List</state>\r
+          <state>Full_with_optimisation\List</state>\r
         </option>\r
         <option>\r
           <name>Variant</name>\r
           <state>$PROJ_DIR$/MicroSemi_Code/CMSIS</state>\r
           <state>$PROJ_DIR$/MicroSemi_Code/drivers/mss_gpio</state>\r
           <state>$PROJ_DIR$/MicroSemi_Code/drivers/mss_watchdog</state>\r
+          <state>$PROJ_DIR$/MicroSemi_Code/drivers/mss_ace</state>\r
+          <state>$PROJ_DIR$/MicroSemi_Code/drivers_config/mss_ace</state>\r
           <state>$PROJ_DIR$/WebServer</state>\r
           <state>$PROJ_DIR$/../Common/ethernet/FreeTCPIP/apps/httpd</state>\r
           <state>$PROJ_DIR$/../Common/ethernet/FreeTCPIP</state>\r
     </group>\r
     <group>\r
       <name>Drivers</name>\r
+      <file>\r
+        <name>$PROJ_DIR$\MicroSemi_Code\drivers_config\mss_ace\ace_config.c</name>\r
+        <excluded>\r
+          <configuration>Blinky</configuration>\r
+        </excluded>\r
+      </file>\r
+      <file>\r
+        <name>$PROJ_DIR$\MicroSemi_Code\drivers\mss_ace\ace_convert.c</name>\r
+        <excluded>\r
+          <configuration>Blinky</configuration>\r
+        </excluded>\r
+      </file>\r
       <file>\r
         <name>$PROJ_DIR$\MicroSemi_Code\drivers\mss_ethernet_mac\crc32.c</name>\r
         <excluded>\r
           <configuration>Blinky</configuration>\r
         </excluded>\r
       </file>\r
+      <file>\r
+        <name>$PROJ_DIR$\MicroSemi_Code\drivers\mss_ace\mss_ace.c</name>\r
+        <excluded>\r
+          <configuration>Blinky</configuration>\r
+        </excluded>\r
+        <configuration>\r
+          <name>Blinky</name>\r
+          <settings>\r
+            <name>ICCARM</name>\r
+            <data>\r
+              <version>26</version>\r
+              <wantNonLocal>0</wantNonLocal>\r
+              <debug>1</debug>\r
+              <option>\r
+                <name>CCDefines</name>\r
+                <state></state>\r
+              </option>\r
+              <option>\r
+                <name>CCPreprocFile</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCPreprocComments</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCPreprocLine</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCListCFile</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCListCMnemonics</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCListCMessages</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCListAssFile</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCListAssSource</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCEnableRemarks</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCDiagSuppress</name>\r
+                <state>Pa082</state>\r
+              </option>\r
+              <option>\r
+                <name>CCDiagRemark</name>\r
+                <state></state>\r
+              </option>\r
+              <option>\r
+                <name>CCDiagWarning</name>\r
+                <state></state>\r
+              </option>\r
+              <option>\r
+                <name>CCDiagError</name>\r
+                <state></state>\r
+              </option>\r
+              <option>\r
+                <name>CCObjPrefix</name>\r
+                <state>1</state>\r
+              </option>\r
+              <option>\r
+                <name>CCAllowList</name>\r
+                <version>1</version>\r
+                <state>0000000</state>\r
+              </option>\r
+              <option>\r
+                <name>CCDebugInfo</name>\r
+                <state>1</state>\r
+              </option>\r
+              <option>\r
+                <name>IEndianMode</name>\r
+                <state>1</state>\r
+              </option>\r
+              <option>\r
+                <name>IProcessor</name>\r
+                <state>1</state>\r
+              </option>\r
+              <option>\r
+                <name>IExtraOptionsCheck</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>IExtraOptions</name>\r
+                <state></state>\r
+              </option>\r
+              <option>\r
+                <name>CCLangConformance</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCSignedPlainChar</name>\r
+                <state>1</state>\r
+              </option>\r
+              <option>\r
+                <name>CCRequirePrototypes</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCMultibyteSupport</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCDiagWarnAreErr</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCCompilerRuntimeInfo</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>IFpuProcessor</name>\r
+                <state>1</state>\r
+              </option>\r
+              <option>\r
+                <name>OutputFile</name>\r
+                <state>$FILE_BNAME$.o</state>\r
+              </option>\r
+              <option>\r
+                <name>CCLibConfigHeader</name>\r
+                <state>1</state>\r
+              </option>\r
+              <option>\r
+                <name>PreInclude</name>\r
+                <state></state>\r
+              </option>\r
+              <option>\r
+                <name>CompilerMisraOverride</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCIncludePath2</name>\r
+                <state>$PROJ_DIR$/../../Source/include</state>\r
+                <state>$PROJ_DIR$/../../Source/portable/IAR/ARM_CM3</state>\r
+                <state>$PROJ_DIR$</state>\r
+                <state>$PROJ_DIR$/MicroSemi_Code/CMSIS</state>\r
+                <state>$PROJ_DIR$/MicroSemi_Code/drivers/mss_gpio</state>\r
+                <state>$PROJ_DIR$/MicroSemi_Code/drivers/mss_watchdog</state>\r
+              </option>\r
+              <option>\r
+                <name>CCStdIncCheck</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCCodeSection</name>\r
+                <state>.text</state>\r
+              </option>\r
+              <option>\r
+                <name>IInterwork2</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>IProcessorMode2</name>\r
+                <state>1</state>\r
+              </option>\r
+              <option>\r
+                <name>CCOptLevel</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCOptStrategy</name>\r
+                <version>0</version>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCOptLevelSlave</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CompilerMisraRules98</name>\r
+                <version>0</version>\r
+                <state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>\r
+              </option>\r
+              <option>\r
+                <name>CompilerMisraRules04</name>\r
+                <version>0</version>\r
+                <state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>\r
+              </option>\r
+              <option>\r
+                <name>CCPosIndRopi</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCPosIndRwpi</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>CCPosIndNoDynInit</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>IccLang</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>IccCDialect</name>\r
+                <state>1</state>\r
+              </option>\r
+              <option>\r
+                <name>IccAllowVLA</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>IccCppDialect</name>\r
+                <state>1</state>\r
+              </option>\r
+              <option>\r
+                <name>IccExceptions</name>\r
+                <state>1</state>\r
+              </option>\r
+              <option>\r
+                <name>IccRTTI</name>\r
+                <state>1</state>\r
+              </option>\r
+              <option>\r
+                <name>IccStaticDestr</name>\r
+                <state>1</state>\r
+              </option>\r
+              <option>\r
+                <name>IccRelaxedFpPrecision</name>\r
+                <state>0</state>\r
+              </option>\r
+              <option>\r
+                <name>IccCppInlineSemantics</name>\r
+                <state>0</state>\r
+              </option>\r
+            </data>\r
+          </settings>\r
+        </configuration>\r
+      </file>\r
       <file>\r
         <name>$PROJ_DIR$\MicroSemi_Code\drivers\mss_ethernet_mac\mss_ethernet_mac.c</name>\r
         <excluded>\r
     <name>$PROJ_DIR$\main-blinky.c</name>\r
     <excluded>\r
       <configuration>Full</configuration>\r
-      <configuration>Full-with-optimisation</configuration>\r
+      <configuration>Full_with_optimisation</configuration>\r
     </excluded>\r
   </file>\r
   <file>\r
index 38ea41fa24c3b7e11eea5e584de7b8188628b15f..ab3facf0aaaf144a0e55b1ab87797584e78a7a0e 100644 (file)
@@ -49,6 +49,7 @@
 #include "apps/httpd/httpd.h"\r
 #include "apps/httpd/httpd-cgi.h"\r
 #include "apps/httpd/httpd-fs.h"\r
+#include "mss_ace.h"\r
 \r
 #include <stdio.h>\r
 #include <string.h>\r
@@ -210,6 +211,8 @@ static unsigned short generate_io_state( void *arg )
 {\r
        extern long lParTestGetLEDState( unsigned long ulLED );\r
        ( void ) arg;\r
+       unsigned short usRawVoltage;\r
+       const ace_channel_handle_t xVoltageChannel = ( ace_channel_handle_t ) 0;\r
 \r
        /* Are the dynamically setable LEDs currently on or off? */\r
        if( lParTestGetLEDState( 3 ) )\r
@@ -221,7 +224,8 @@ static unsigned short generate_io_state( void *arg )
                pcStatus = "";\r
        }\r
 \r
-       sprintf( uip_appdata, "<input type=\"checkbox\" name=\"LED0\" value=\"1\" %s>LED<p><p>", pcStatus );\r
+       usRawVoltage = ( unsigned short ) ACE_get_ppe_sample( xVoltageChannel );        \r
+       sprintf( uip_appdata, "<input type=\"checkbox\" name=\"LED0\" value=\"1\" %s>LED<p><p><p>Raw voltage input is %d", pcStatus, usRawVoltage );\r
 \r
        return strlen( uip_appdata );\r
 }\r
index af060a25c603921dbea46aa6f238fedfb29d20cf..cd04278b2dc0db450b2ee75a8d03b43a38e06dcc 100644 (file)
@@ -308,6 +308,8 @@ unsigned long ulReceivedValue;
 \r
 static void prvSetupHardware( void )\r
 {\r
+       SystemCoreClockUpdate();\r
+\r
        /* Disable the Watch Dog Timer */\r
        MSS_WD_disable( );\r
 \r
@@ -376,4 +378,21 @@ volatile size_t xFreeStackSpace;
                reduced accordingly. */\r
        }\r
 }\r
+/*-----------------------------------------------------------*/\r
+\r
+void vMainConfigureTimerForRunTimeStats( void )\r
+{\r
+       /* This function is not used by the Blinky build configuration, but needs\r
+       to be defined as the Blinky and Full build configurations share a\r
+       FreeRTOSConfig.h header file. */\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+unsigned long ulGetRunTimeCounterValue( void )\r
+{\r
+       /* This function is not used by the Blinky build configuration, but needs\r
+       to be defined as the Blinky and Full build configurations share a\r
+       FreeRTOSConfig.h header file. */\r
+       return 0UL;\r
+}\r
 \r
index cb7eb25aee115757b79270a35ce390efe9835bdc..d412c41dab5758f55c9a965de901d73038a0788b 100644 (file)
 #include "mss_gpio.h"\r
 #include "mss_watchdog.h"\r
 #include "mss_timer.h"\r
+#include "mss_ace.h"\r
 #include "oled.h"\r
 \r
 /* Common demo includes. */\r
@@ -551,6 +552,9 @@ static void prvSetupHardware( void )
 \r
        /* Configure the GPIO for the LEDs. */\r
        vParTestInitialise();\r
+       \r
+       /* ACE Initialization */\r
+       ACE_init();\r
 \r
        /* Setup the GPIO and the NVIC for the switch used in this simple demo. */\r
        NVIC_SetPriority( GPIO8_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );\r
@@ -628,6 +632,7 @@ const unsigned long ulMax32BitValue = 0xffffffffUL;
        MSS_TIM64_start();\r
 }\r
 /*-----------------------------------------------------------*/\r
+\r
 unsigned long ulGetRunTimeCounterValue( void )\r
 {\r
 unsigned long long ullCurrentValue;\r
index 3a6ea91e6867efdfd921cc7d1fec4f8ca9fefb06..b3e150b7fec93fbbf38405f716dd8c3e845d88d0 100644 (file)
@@ -159,8 +159,8 @@ clock_time_t clock_time( void )
 void vuIP_Task( void *pvParameters )\r
 {\r
 portBASE_TYPE i;\r
-unsigned long ulNewEvent = 0UL;\r
-unsigned long ulUIP_Events = 0UL;\r
+unsigned long ulNewEvent = 0UL, ulUIP_Events = 0UL;\r
+long lPacketLength;\r
 \r
        /* Just to prevent compiler warnings about the unused parameter. */\r
        ( void ) pvParameters;\r
@@ -174,11 +174,13 @@ unsigned long ulUIP_Events = 0UL;
        for( ;; )\r
        {\r
                /* Is there received data ready to be processed? */\r
-               uip_len = MSS_MAC_rx_packet();\r
+               lPacketLength = MSS_MAC_rx_packet();\r
 \r
                /* Statements to be executed if data has been received on the Ethernet. */\r
-               if( ( uip_len > 0 ) && ( uip_buf != NULL ) )\r
+               if( ( lPacketLength > 0 ) && ( uip_buf != NULL ) )\r
                {\r
+                       uip_len = ( u16_t ) lPacketLength;\r
+                       \r
                        /* Standard uIP loop taken from the uIP manual. */\r
                        if( xHeader->type == htons( UIP_ETHTYPE_IP ) )\r
                        {\r
@@ -356,7 +358,7 @@ void vEMACWrite( void )
 {\r
 const long lMaxAttempts = 10;\r
 long lAttempt;\r
-const portTickType xShortDelay = ( 10 / portTICK_RATE_MS );\r
+const portTickType xShortDelay = ( 5 / portTICK_RATE_MS );\r
 \r
        /* Try to send data to the Ethernet.  Keep trying for a while if data cannot\r
        be sent immediately.  Note that this will actually cause the data to be sent\r