We are using TMS320F28335 and CCS 3.3 with latest code genration tools.
I just wanted to work around this word alignment issue.
I have a structure say
typedef struct _x_x
{
unsigned char a;
unsigned char b;
unsigned short c;
unsigned short d;
}
The size of this structure returns 4. I think this is due to word alignment on this controller. But is it possible to set some compiler options to behave as a byte aligned and return a size of 6 and do the back ground operations to work as if its a byte aligned controller.
I could not able to port code which is written and work on byte alignment.
for example, lets say i'm receiving data on a parellel port (8bit), i would like to typecast the structure pointer to a char pointer and stream in the data and then back typecast to structure and use it. This is not working out as the otherside device streams in data on byte aligned format.
Any suggestioins pls.