##############################################################################
#                                                                            #
# IAR ARM ANSI C/C++ Compiler V4.11A/W32               20/Jul/2004  18:58:53 #
# Copyright 1999-2004 IAR Systems. All rights reserved.                      #
#                                                                            #
#    Cpu mode        =  arm                                                  #
#    Endian          =  little                                               #
#    Stack alignment =  4                                                    #
#    Source file     =  C:\medusa\clivar.c                                   #
#    Command line    =  -I "C:\Program Files\IAR Systems\Embedded Workbench  #
#                       4.0\ARM\INC\" -lc C:\medusa\Debug\List\ -la          #
#                       C:\medusa\Debug\List\ -o C:\medusa\Debug\Obj\ -s2    #
#                       --no_cse --no_unroll --no_inline --no_code_motion    #
#                       --no_tbaa --no_clustering --no_scheduling --debug    #
#                       --cpu_mode arm --endian little --cpu ARM7TDMI-S      #
#                       --stack_align 4 -e --fpu None                        #
#                       "-D_DLIB_CONFIG_FILE=C:\Program Files\IAR            #
#                       Systems\Embedded Workbench                           #
#                       4.0\ARM\LIB\dl4tpannl8n.h" C:\medusa\clivar.c        #
#    List file       =  C:\medusa\Debug\List\clivar.lst                      #
#    Object file     =  C:\medusa\Debug\Obj\clivar.r79                       #
#                                                                            #
#                                                                            #
##############################################################################

C:\medusa\clivar.c
      1          #include "archinc.h"
      2          #include "cli.h"
      3          #include "clivar.h"

  #ifndef __CLIVAR_H__
                     ^
"C:\medusa\clivar.h",1  Warning[Pa050]: non-native end of line sequence
          detected (this diagnostic is only issued once)
      4          
      5          #include <stdio.h>
      6          
      7          typedef enum {unused, integer, string, singleFloat} clivarType;
      8          
      9          typedef struct cliVariable_tag {
     10            clivarType varType;
     11            char variableName[CONFIG_CLIVAR_VAR_LEN];
     12            char variableValue[CONFIG_CLIVAR_VAL_LEN];
     13            union {
     14              int sint;
     15              float single;
     16              } u;
     17            } cliVariable, *pCliVariable;
     18          
     19          static cliVariable variableTable[CONFIG_CLIVAR_MAX_VARIABLES];
                                    ^
Warning[Pe550]: variable "variableTable" was set but never used
     20          static int variableTableLen;
     21          
     22          static char * varaddHelpText = "varadd <name> [-i -f -s] <value>";
     23          
     24          int addVariableHandler(int, char **, int);
     25          
     26          int clivarInit(void)
     27          {
     28            int i;
     29          
     30            variableTableLen = 0;
     31          
     32            // initialize all variables to unused
     33            for(i=0; i<CONFIG_CLIVAR_MAX_VARIABLES;i++)
     34              variableTable[i].varType = unused;
     35          
     36            cliRegisterCommand("varadd", addVariableHandler, varaddHelpText);
     37            return 0;
     38          }
     39          
     40          int addVariableHandler(int argc, char * argv[], int flags)
     41          {
     42            int retVal = -1;
     43            
     44            printf("%s: [%d] arguments\n",argv[0],argc);
     45          
     46            if (variableTableLen == CONFIG_CLIVAR_MAX_VARIABLES)
     47              return retVal;
     48          
     49            if (argc != 3)
     50              return retVal;
     51          
     52            return retVal;
     53          }
     54          

   Maximum stack usage in bytes:

     Function           CSTACK
     --------           ------
     addVariableHandler    20
     clivarInit             8


   Segment part sizes:

     Function/Label                 Bytes
     --------------                 -----
     variableTable                   640
     variableTableLen                  4
     varaddHelpText                    4
     clivarInit                      104
     addVariableHandler               92
     ??DataTable1                      4
     ?<Initializer for varaddHelpText>
                                       4
     ?<Constant "varadd <name> [-i -f ...">
                                      36
     ?<Constant "varadd">              8
     ?<Constant "%s: [%d] arguments\n">
                                      20
      Others                          48

 
 224 bytes in segment CODE
  64 bytes in segment DATA_C
   4 bytes in segment DATA_I
   4 bytes in segment DATA_ID
 644 bytes in segment DATA_Z
  24 bytes in segment INITTAB
 
 200 bytes of CODE  memory (+ 48 bytes shared)
  68 bytes of CONST memory
 648 bytes of DATA  memory

Errors: none
Warnings: 2
