Question about microblaze C complier

Feb 18, 2005 3 Replies

Hi all, I hope that some of you that are writing code for the microblaze be able to help with the following question:



Normally C stractures are aligned on a 4 byte addresses boundaries. But usually in communication application there is a need to parse messages buffers with fields that are aligned on a single byte basis. I know on other CPUs that there is a #pragma commands that allow a definition of structures as "packed".



Does anyone knows how to define packed structures on Microblaze C compiler? and if so can you provide an example?



Thanks in advance, Moti.



For MicroBlaze, maybe.

Probably.

__attribute__((packed))

It's in the GCC manual.

Cheers, Jon

Thanks a lot Jon, I missed that, or maybe I was too lazy to read manual ;-)

Regards, Moti.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required