I am having trouble building a program for the robostix.

I modified one of the examples in the robostix repository. I needed to
add a little functionality to the i2c-io program. It builds fine
without the modifications. I am having issues with building the
program with my modifications. The modification allows me to handle a
string of numbers that are being sent in from an outside device on
uart1.

I modified the makefile to include the UART.o objects.

I checked out a fresh copy from the svn repo. ran make in the i2c-io
folder. it worked. added in my modifications. then ran make again and
it failed.

So what can I do to enable the uart.c file to be built and linked properly?

Thanks

Bowen

---------

Here is the errors when I try to build:

~/gumstix/robostix/i2c-io$ make
../Rules.mk:231: i2c-io.d: No such file or directory
../Rules.mk:231: i2c-slave-boot.d: No such file or directory
../Rules.mk:231: Delay.d: No such file or directory
../Rules.mk:231: Timer.d: No such file or directory
../Rules.mk:231: Hardware.d: No such file or directory
../Rules.mk:231: memcpy_EP.d: No such file or directory
../Rules.mk:231: UART.d: No such file or directory
Creating svn-version.h ...
Compiling i2c-io.c ...
cc1: warnings being treated as errors
i2c-io.c: In function 'main':
i2c-io.c:190: warning: implicit declaration of function 'UART1_IsCharAvailable'
i2c-io.c:190: warning: nested extern declaration of 'UART1_IsCharAvailable'
i2c-io.c:192: warning: implicit declaration of function 'UART1_GetChar'
i2c-io.c:192: warning: nested extern declaration of 'UART1_GetChar'
i2c-io.c:204: warning: implicit declaration of function 'atoi'
i2c-io.c:204: warning: nested extern declaration of 'atoi'
make: *** [i2c-io.o] Error 1
~/gumstix/robostix/i2c-io$


Here is the part of the makefile I uncommented:

COMMON_OBJS = \

       i2c-slave-boot.o \

       Delay.o         \

       Timer.o         \

       Hardware.o



COMMON_OBJS += \

       UART.o          \

       Log.o

The code I modified in the i2c-io.c file:

   count = 0;

       int i,j;
       char ch;
       char pflite[255];

       uint16_t val16;
       val16 = 0;
       uint8_t             valH = (( val16 >> 8 ) & 0xFF);
       uint8_t             valL = ( val16         & 0xFF);
       uint8_t *lowbyte = (uint8_t *)0x88;
       uint8_t *highbyte = (uint8_t *)0x89;
       *highbyte = valH;
       *lowbyte = valL;
       j=0;
       i = 0;

   while ( 1 )
   {


               if ( UART1_IsCharAvailable() )
               {
                       ch = UART1_GetChar();
                       if (ch == 13 )// || ch == 10 || ch == '\n' || ch == '\r')
                       {
                               ch = '\0';
                               i = 1;  //write string
                       }
                       pflite[j] = ch;
                       j++;
               }

               if (i==1)//write string to register
               {
                       val16 = (uint16_t)atoi(pflite);
                       valH = (( val16 >> 8 ) & 0x00ff);
                       valL = ( val16         & 0x00ff);
                       *highbyte = valH;
                       *lowbyte = valL;

                       j=0;
                       i=0;
               }

       tick_t prevTick;

       switch ( count )
       {
           case   0:   LED_ON();       break;
           case  10:   LED_OFF();      break;
           case  20:   LED_ON();       break;
           case  30:   LED_OFF();      break;
           case 100:   count = -1;     break;
       }