From 7595b6dd2daf5e49d970d5d91ba7a6ea9fe88dbe Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Wed, 31 Jan 2024 18:55:42 +0900 Subject: [PATCH] ramconfig.ld: Fix end of gnssram bss section on ldscript Fix a bug that the end address of gnssram bss section is incorrect when bss is located using GNSSRAM_BSS attribute. Fix ld warning: start of section .gnssram.data changed by 4. --- .../spresense/1.0.0/variants/spresense/ramconfig-new.ld | 7 ++++--- .../spresense/1.0.0/variants/spresense/ramconfig.ld | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/variants/spresense/ramconfig-new.ld b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/variants/spresense/ramconfig-new.ld index 9e1231a1..ba2de421 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/variants/spresense/ramconfig-new.ld +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/variants/spresense/ramconfig-new.ld @@ -42,7 +42,7 @@ SECTIONS } > gnssram - .gnssram.data . : ALIGN(8) { + .gnssram.data . : ALIGN(4) { /* Possible to locate data of any object file. * *libxxx.a:*.o(.data .data.*) */ @@ -58,10 +58,11 @@ SECTIONS * *libxxx.a:*.o(COMMON) */ - . = ALIGN(4); - _gnssramebss = ABSOLUTE(.); } > gnssram + . = ALIGN(4); + _gnssramebss = ABSOLUTE(.); + /* Whatever is left from the GNSS memory is used as a special heap. */ _sgnssheap = ABSOLUTE(.); diff --git a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/variants/spresense/ramconfig.ld b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/variants/spresense/ramconfig.ld index b14d1f57..0a023588 100644 --- a/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/variants/spresense/ramconfig.ld +++ b/Arduino15/packages/SPRESENSE/hardware/spresense/1.0.0/variants/spresense/ramconfig.ld @@ -42,7 +42,7 @@ SECTIONS } > gnssram - .gnssram.data . : ALIGN(8) { + .gnssram.data . : ALIGN(4) { /* Possible to locate data of any object file. * *libxxx.a:*.o(.data .data.*) */ @@ -58,10 +58,11 @@ SECTIONS * *libxxx.a:*.o(COMMON) */ - . = ALIGN(4); - _gnssramebss = ABSOLUTE(.); } > gnssram + . = ALIGN(4); + _gnssramebss = ABSOLUTE(.); + /* Whatever is left from the GNSS memory is used as a special heap. */ _sgnssheap = ABSOLUTE(.);