Embedded Design Handbook

ID 683689
Date 8/28/2023
Public
Document Table of Contents

5.3.4.3.5. Word Alignment

In most cases, you can program a Nios® II boot image starting at a 32-bit data boundary in flash memory. This placement allows the boot copier to copy application data with 32-bit word transfers. However, the advanced boot copier example does not assume this alignment. If the boot copier finds a valid boot image that is not 32-bit word-aligned in flash memory, the boot copier can still copy the application to RAM accurately. The boot copier uses the memcpy() library function to perform the copying. The memcpy() function requires little memory, and using memcpy() is a fast and robust method for copying data regardless of its alignment in memory.