Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Structure/enum alignment

Sitanshu_N_Intel
Employee
647 Views

Do we need to provide a 32 bit number for the last entity of the enum? in order to get it aligned to word boundary?

I see that if this entry is not present then I see corruption for variables before or after.

0 Kudos
2 Replies
JOHI
New Contributor II
184 Views

Hello,

The Pragma PACK directive can be of service in your case.

However, can you provide an example of your code to clarify your issue.

A rogue pointer is more likely to be the cause of your trouble.

Best Regards,

Johi.

Ahmed_H_Intel1
Employee
184 Views
Hi Sitanshu, I think so, you have to provide a 32 bit number. Can you share a sample code to check what you are tring to do?
Reply