Forum Discussion
Altera_Forum
Honored Contributor
13 years agoA big bug?
Hi, Here is a simple program:# include <stdio.h># include <io.h># include "sys/alt_stdio.h"# include "alt_types.h"# include "system.h" alt_u8 SND[1100]; int main() { int i; ...
Altera_Forum
Honored Contributor
13 years agoSince SND[] is a byte array, it might have any alignment. You can force a larger alignment (with gcc) by writing:
unsigned char SND __attribute__((aligned(32))); You can similarly reduce the alignment of structure members - gcc will generate code to read/write the separate bytes of the field.