I don't have much experience with linker scripts, so maybe I'm just misunderstanding something here. The LD linker script for the ATmega32u4 (avr5.x) specifies that data memory (SRAM) starts at 0x800060
. I know that 0x800000
is just a special offset that the compiler uses for SRAM pointers, but why use 0x60
as the base of RAM? The ATmega32u4 datasheet shows that 0x60
is the start of external I/O registers and that SRAM actually starts at 0x100
. Doesn't that mean the external I/O registers will be clobbered when the .data
section is copied into SRAM?
0
votes