This issue affects code intended to execute in place in flash
alt_load() to copy writable sections to RAM.
If an ELF section (for example
.bss) is to be copied from
flash to RAM using
alt_load(), the software build tools
verify that the section fits in RAM but not that it fits in the
flash memory that it will be programmed in. The tools generate a
programming file without any indication of a code size error.
This issue is more likely to affect you if your target memory
is the MAX 10 onchip flash, which is relatively small. This issue
only affects you if you are using
You can manually determine whether your code fits by looking at the beginning of the .objdump file, created when you build your application. This file contains information that you can use to determine whether each section fits in your flash memory, as demonstrated in the following example.
The .objdump file is created in the application’s
top-level directory of the application. You can generate it from
the command line by typing
make app in the application
Near the top of the .objdump file is a list of sections similar to the following:
Each section has values for size, VMA, and LMA. VMA is the runtime address, and LMA is the load address. If a section is not copied, VMA = LMA. If a section is copied, it is copied from LMA to VMA.
In this case, which uses
not copied (VMA = LMA).
.bss are copied from a flash address (LMA) to a RAM
The flash in this example has a range of 0x28000 to 0x30000.
.rwdata section is programmed to flash starting
at VMA = 0x2e7a0, and extends to VMA Size = 0x2e7a0 0x1b78 =
0x30518. Therefore it does not fit in flash.