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