Forum Discussion
Altera_Forum
Honored Contributor
7 years agoI'm afraid you will have to go through the LUFA code and change all the places where unaligned pointers are used. To help you, you can use the -Wcast-align option in gcc and it will generate a warning each time it thinks an unaligned transfer can happen.
IIRC unaligned transfers trigger a bus error on some ARM architectures also so it's really not good practise when making portable code. GCC for ARM has a -mno-unaligned-access option that will automatically convert unaligned accesses into multiple byte accesses, but unfortunately it doesn't seem that this option is available for the Nios II architecture.