From 213a6240a17870dea2603e7fd01ff163468e50c9 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Fri, 20 Mar 2020 14:32:57 +0100 Subject: [PATCH] avr: move data address space to 0x800000 This convention is followed by most of the avr-gcc toolchain but older versions of binutils don't mind overlapping program/data spaces. However, newer versions start complaining about an overlap in address space: avr-ld: section .stack VMA [0000000000000100,00000000000002ff] overlaps section .text VMA [0000000000000000,0000000000000225] This commit moves the data space in the linker script to 0x800000, like the rest of the toolchain does. --- targets/avr.ld | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/avr.ld b/targets/avr.ld index 7e45b533..a7c2d90c 100644 --- a/targets/avr.ld +++ b/targets/avr.ld @@ -1,8 +1,8 @@ MEMORY { - FLASH_TEXT (rw) : ORIGIN = 0, LENGTH = __flash_size - _bootloader_size - RAM (xrw) : ORIGIN = __ram_start, LENGTH = __ram_size + FLASH_TEXT (rw) : ORIGIN = 0, LENGTH = __flash_size - _bootloader_size + RAM (xrw) : ORIGIN = 0x800000 + __ram_start, LENGTH = __ram_size } SECTIONS