libopencm3/libopencm3 — pull request #21 by jdk (2012-08-15 01:38:12+00:00)
Title: Updated alignment issues

Both these issues caused me days of grief. I tracked the USB core alignment issue after enabling hardware_faults, and tracing the code. The enum size is only one byte, so the address of usb_setup_data is not guaranteed to be aligned.

The second issue was when a colleague ported over bsd printf, sscanf was broken and he figured it out as the cause being an alignment issue in the etext section. The table compiled and needed by scanf was not aligned properly. Adding the linker flag fixed the issue.

Thanks so much.

Sincerely,
Jason