2.2.2 Application Start
For the AVR GCC linker script to know where in the Flash to put the compiled
application code, the start of the
.text
code section must be
configured to correspond with the location of the Flash sections. The input is
word-aligned, so the following numbers may be used:- Boot start:
0x0000
(default). - Application Code start: BOOTEND * 0x80.
- Application Data start: APPEND * 0x80.
Using BOOTEND fuse setting 0x02 as an example (256 word boot size),
relocation of the application code
.text
section is done by using the
following linker option:
-Wl,--section-start=.text=0x100
In Atmel® Studio
7.0, relocation can be done in Project
Properties (Alt+F7) → Toolchain → AVR/GNU Linker → Memory Settings, by
adding .text=0x100
to the FLASH segment, as shown in Figure 2-4.