Hi,
 
I'm using the latest windows build of the mspgcc compiler. 
 
When compiling the file fpga_command_iterface.c, it returns the following 
errors with a mspgcc header file:
 
 
In file included from j:/win32/msp430/gcc/current/msp430/include/iomacros.h:35,
                 from j:/win32/msp430/gcc/current/msp430/include/msp430x14x.h:15
,
                 from j:/win32/msp430/gcc/current/msp430/include/io.h:45,
                 from l:/nasnet/include/nasnet/defs/msp430/msp430/msp430.h:18,
                 from fpga_command_interface.c:14:
j:/win32/msp430/gcc/current/msp430/include/sys/inttypes.h: In function `findHydr
ophonePeakDetect':
j:/win32/msp430/gcc/current/msp430/include/sys/inttypes.h:36: storage class spec
ified for parameter `int8_t'
j:/win32/msp430/gcc/current/msp430/include/sys/inttypes.h:37: storage class spec
ified for parameter `uint8_t'
j:/win32/msp430/gcc/current/msp430/include/sys/inttypes.h:39: storage class spec
ified for parameter `int16_t'
j:/win32/msp430/gcc/current/msp430/include/sys/inttypes.h:40: storage class spec
ified for parameter `uint16_t'
j:/win32/msp430/gcc/current/msp430/include/sys/inttypes.h:42: storage class spec
ified for parameter `int32_t'
j:/win32/msp430/gcc/current/msp430/include/sys/inttypes.h:43: storage class spec
ified for parameter `uint32_t'
j:/win32/msp430/gcc/current/msp430/include/sys/inttypes.h:45: storage class spec
ified for parameter `int64_t'
j:/win32/msp430/gcc/current/msp430/include/sys/inttypes.h:46: storage class spec
ified for parameter `uint64_t'
j:/win32/msp430/gcc/current/msp430/include/sys/inttypes.h:48: storage class spec
ified for parameter `int16_t'
j:/win32/msp430/gcc/current/msp430/include/sys/inttypes.h:48: redeclaration of `
int16_t'
j:/win32/msp430/gcc/current/msp430/include/sys/inttypes.h:39: `int16_t' previous
ly declared here
j:/win32/msp430/gcc/current/msp430/include/sys/inttypes.h:48: parse error before
 "intptr_t"
 
 
the function "findHydrophonePeakDetect" in fpga_command_interface is as follows:
 
 
NIX_BYTE
findHydrophonePeakDetect(NIX_BYTE hydrophone_status_mask, Timer start_timer)
{
    NIX_BYTE receiver_status = 0x00;
    
    while ((receiver_status & hydrophone_status_mask) == 0)
    {
        readFromFpga(AlteraCommand_RxStatusRegister, &receiver_status, 1);
 
        // check for timeout
        if (hasTimerExpired(start_timer))
            return 0x00;
    }
    
    // figure out which hydrophone it was
    
    if (receiver_status && RECEIVER_HYDROPHONE_1)
    {
        return 0x01;
    }
    if (receiver_status && RECEIVER_HYDROPHONE_2)
    {
        return 0x02;
    }
    if (receiver_status && RECEIVER_HYDROPHONE_3)
    {
        return 0x03;
    }
    if (receiver_status && RECEIVER_HYDROPHONE_4)
    {
        return 0x04;
    }
 
}

... any suggestions?
 
thanks,
 
Elwyn

Reply via email to