##############################################################################
#                                                                            #
# IAR ARM ANSI C/C++ Compiler V4.11A/W32               20/Jul/2004  18:58:49 #
# Copyright 1999-2004 IAR Systems. All rights reserved.                      #
#                                                                            #
#    Cpu mode        =  arm                                                  #
#    Endian          =  little                                               #
#    Stack alignment =  4                                                    #
#    Source file     =  C:\medusa\board.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\board.c         #
#    List file       =  C:\medusa\Debug\List\board.lst                       #
#    Object file     =  C:\medusa\Debug\Obj\board.r79                        #
#                                                                            #
#                                                                            #
##############################################################################

C:\medusa\board.c
      1          #include "archinc.h"
      2          #include "board.h"
      3          #include "cli.h"
      4          #include "clichar.h"
      5          
      6          #include <stdio.h>
      7          
      8          static int iostatHandler(int argc, char * argv[], int flags);
      9          
     10          #ifdef CONFIG_TOOLCHAIN_IAR
     11          //#pragma inline
     12          #endif
     13          void INLINE_KEYWORD boardSetBusyLed(boolean onOff)
     14          {
     15          #ifdef CONFIG_BOARD_MEDUSA
     16            medusaSetOrangeLed(onOff);
     17          #endif
     18          }
     19          
     20          #ifdef CONFIG_TOOLCHAIN_IAR
     21          #pragma inline
     22          #endif
     23          void INLINE_KEYWORD boardSetTimerLed(boolean onOff)
     24          {
     25          #ifdef CONFIG_BOARD_MEDUSA
     26            medusaSetGreenLed(onOff);
     27          #endif
     28          #ifdef CONFIG_BOARD_OLIMEX
     29            if (onOff == false)
     30              olimexLedOff();
     31            else
     32              olimexLedOn();
     33          #endif
     34          }
     35          
     36          #ifdef CONFIG_TOOLCHAIN_IAR
     37          //#pragma inline
     38          #endif
     39          void INLINE_KEYWORD boardTimerLedToggle(void)
     40          {
     41          #ifdef CONFIG_BOARD_MEDUSA
     42            medusaToggleGreenLed();
     43          #endif
     44          #ifdef CONFIG_BOARD_OLIMEX
     45            olimexLedToggle();
     46          #endif
     47          }
     48          
     49          void boardInit(void)
     50          {
     51          #ifdef CONFIG_BOARD_NOHAU
     52            nohauInit();
     53          #endif
     54          
     55          #ifdef CONFIG_BOARD_OLIMEX
     56            olimexInit();
     57          #endif
     58          
     59          #ifdef CONFIG_BOARD_MEDUSA
     60            medusaInit();
     61            medusaSetOrangeLed(true);
     62          #endif
     63          
     64            cliRegisterCommand("iostat", iostatHandler, "iostat - shows lpc210x IOPIN and IODIR regs");
     65           
     66          }
     67          
     68          static int iostatHandler(int argc, char * argv[], int flags)
     69          {
     70            int retVal = -1;
     71            int bufLen;
     72            char * pOutBuf;
     73          
     74            pOutBuf = clicharGetOutputBuffer(&bufLen);
     75            
     76            // TODO: put this in a while loop to process a list of op/data pairs
     77          
     78            sprintf(pOutBuf, "IOPIN[%08x] IODIR[%08x]\n", (IOPIN), (IODIR));
                                                                                  ^
Warning[Pa082]: undefined behavior: the order of volatile accesses is
          undefined in this statement
     79            clicharSendOutputBuffer(pOutBuf, bufLen);
     80            retVal = 0;
     81          
     82            return retVal;
     83          }

   Maximum stack usage in bytes:

     Function            CSTACK
     --------            ------
     boardInit               4
     boardSetBusyLed         8
     boardTimerLedToggle     4
     iostatHandler          28


   Segment part sizes:

     Function/Label                 Bytes
     --------------                 -----
     boardSetBusyLed                  20
     boardTimerLedToggle              12
     boardInit                        48
     iostatHandler                   112
     ?<Constant "iostat">              8
     ?<Constant "iostat - shows lpc210...">
                                      44
     ?<Constant "IOPIN[%08x] IODIR[%08x]\n">
                                      28
      Others                          84

 
 276 bytes in segment CODE
  80 bytes in segment DATA_C
 
 192 bytes of CODE  memory (+ 84 bytes shared)
  80 bytes of CONST memory

Errors: none
Warnings: 1
