This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

I'm getting: error #71 incomplete type not allowed

Other Parts Discussed in Thread: TMS320F28075, TMS320F2806

Hello all,

I've searched through the archives and I can't find a solution to my problem here.  I am using CCSv6.1 and the TMS320F28075 processor.  I declare a few structs, then I try to use them.  Once I try to use them, I get the "#71 incomplete type not allowed" error.  Here is the code:

From the "library" file:

struct COILS_s
{

SPI_COMM_PACKET_DATA_t spi_comm_packet; 

SPI_COMM_PACKET_DATA_t spi_comm_packet_z1; 
SPI_COMM_PACKET_DATA_t spi_comm_packet_trap;
SPI_COMM_PACKET_DATA_t spi_comm_packet_trap_pfc; 

};

struct MODBUS_DATA_s
{
                    struct COILS_s coils;
};

volatile struct MODBUS_DATA_s modbus_data;

From the "program" file:

extern volatile struct MODBUS_DATA_s   modbus_data;

modbus_data.coils.spi_comm_packet_z1 = modbus_data.coils.spi_comm_packet;
modbus_data.coils.spi_comm_packet = spi_comm_packet_debounce;

I get the error on the highlighted lines on the usages of the modbus_data struct.  I've been back and forth with this, changing the declarations from structs to typedefs, moving things from one file to another, etc.  I have tried removing the "struct" keyword in the extern volatile struct MODBUS_DATA_s   modbus_data; at the top of the "program" file (I get an error in this case complaining that the MODBUS_DATA_s type isn't defined).

Any help here would be appreciated.  I am totally stuck for a seemingly good block of code.  Also, I will note that this code is copy-pasted from a previous project on CCSv3.3 (and TMS320F2806 processor), and it works fine there.

Thanks,

Justin

  • I cannot reproduce the problem. I'll need to see a more complete test case. What is the exact text of the error message? What are the command-line options you are using? Are you compiling for C or C++?

    Make sure the type SPI_COMM_PACKET_DATA_t is correctly defined. Presumably the lack of _s on the end means it's not a struct? Is it a typedef? Is it a typedef of a struct?

    Try moving these definitions to a smaller test case, and reducing the test case until the error no longer happens; this should give you a good idea of where the problem is.