Is there any #pragma directives for C6000 compiler which can pack structure? (The #pragma PACK directive doesn't exist for that compiler as I found out).
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.
Thank you very much for the suggestion. But I can't do what I want even when I use that directive.
I try to declare a structure:
__attribute__((__packed__)) typedef struct { T_IP_ID id; T_IP_TYPE type; uint16_t len; uint8_t payload[INTERPROC_BUF_SIZE]; } T_INTERPROC_CMD;
but I've got a warning message:
#1176-D the "packed" attribute is ignored in a typedef
I don't have an idea how to fix that because I need to cast a pointer from a raw byte array to the structure like that:
uint8_t byte_array[100500]; T_INTERPROC_CMD *p_buf = (T_INTERPROC_CMD *)byte_array;
P.S. My version of CCS is 6.0.1.00040, processor is C6748 (OMAP-L138 DSP core)