From ebfd0b22f9bd6838153d5808e10ff9334218394c Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Wed, 31 May 2023 08:54:25 +0200 Subject: [PATCH] boards/nrf53: unify linker scripts Unify linker scripts: - use the same name for linker scripts - merge RPTUN linker scripts with standard linker scripts --- .../nrf53/nrf5340-audio-dk/scripts/Make.defs | 4 +- .../{flash_config_app.ld => flash_app.ld} | 12 +- .../scripts/flash_config_net.ld | 108 ----------------- .../scripts/flash_net.ld} | 13 +- boards/arm/nrf53/nrf5340-dk/scripts/Make.defs | 8 -- .../arm/nrf53/nrf5340-dk/scripts/flash_app.ld | 10 +- .../arm/nrf53/nrf5340-dk/scripts/flash_net.ld | 10 +- .../nrf5340-dk/scripts/flash_rptun_app.ld | 114 ------------------ .../nrf5340-dk/scripts/flash_rptun_net.ld | 109 ----------------- boards/arm/nrf53/thingy53/scripts/Make.defs | 8 -- .../arm/nrf53/thingy53/scripts/flash_app.ld | 10 +- .../arm/nrf53/thingy53/scripts/flash_net.ld | 10 +- .../nrf53/thingy53/scripts/flash_rptun_app.ld | 114 ------------------ 13 files changed, 58 insertions(+), 472 deletions(-) rename boards/arm/nrf53/nrf5340-audio-dk/scripts/{flash_config_app.ld => flash_app.ld} (92%) delete mode 100644 boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_config_net.ld rename boards/arm/nrf53/{thingy53/scripts/flash_rptun_net.ld => nrf5340-audio-dk/scripts/flash_net.ld} (92%) delete mode 100644 boards/arm/nrf53/nrf5340-dk/scripts/flash_rptun_app.ld delete mode 100644 boards/arm/nrf53/nrf5340-dk/scripts/flash_rptun_net.ld delete mode 100644 boards/arm/nrf53/thingy53/scripts/flash_rptun_app.ld diff --git a/boards/arm/nrf53/nrf5340-audio-dk/scripts/Make.defs b/boards/arm/nrf53/nrf5340-audio-dk/scripts/Make.defs index 98794567d0..14263ce6a5 100644 --- a/boards/arm/nrf53/nrf5340-audio-dk/scripts/Make.defs +++ b/boards/arm/nrf53/nrf5340-audio-dk/scripts/Make.defs @@ -23,11 +23,11 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv8-m/Toolchain.defs ifeq ($(CONFIG_ARCH_CHIP_NRF5340_CPUAPP),y) -LDSCRIPT = flash_config_app.ld +LDSCRIPT = flash_app.ld endif ifeq ($(CONFIG_ARCH_CHIP_NRF5340_CPUNET),y) -LDSCRIPT = flash_config_net.ld +LDSCRIPT = flash_net.ld endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) diff --git a/boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_config_app.ld b/boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_app.ld similarity index 92% rename from boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_config_app.ld rename to boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_app.ld index 437a2b74da..2cd8a32566 100644 --- a/boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_config_app.ld +++ b/boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_app.ld @@ -1,5 +1,5 @@ /**************************************************************************** -* boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_config_net.ld +* boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_net.ld * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,10 +18,18 @@ * ****************************************************************************/ +#include + +#ifdef CONFIG_RPTUN +# define RPTUN_SHMEM 0x8000 +#else +# define RPTUN_SHMEM 0 +#endif + MEMORY { progmem (rx) : ORIGIN = 0x00000000, LENGTH = 1024K - datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K + datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K - RPTUN_SHMEM } OUTPUT_ARCH(arm) diff --git a/boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_config_net.ld b/boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_config_net.ld deleted file mode 100644 index 7e2026edbf..0000000000 --- a/boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_config_net.ld +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -* boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_config_net.ld - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -MEMORY -{ - app_progmem (rx) : ORIGIN = 0x00000000, LENGTH = 1024K - app_datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K - progmem (rx) : ORIGIN = 0x01000000, LENGTH = 256K - datamem (rwx) : ORIGIN = 0x21000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(__start) /* Treat __start as the anchor for dead code stripping */ -EXTERN(_vectors) /* Force the vectors to be included in the output */ -SECTIONS -{ - .text : - { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > progmem - - .init_section : - { - _sinit = ABSOLUTE(.); - *(.init_array .init_array.*) - _einit = ABSOLUTE(.); - } > progmem - - .ARM.extab : - { - *(.ARM.extab*) - } > progmem - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : - { - *(.ARM.exidx*) - } > progmem - __exidx_end = ABSOLUTE(.); - - _eronly = ABSOLUTE(.); - - .data : - { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - . = ALIGN(4); - _edata = ABSOLUTE(.); - } > datamem AT > progmem - - /* BSS */ - - .bss : - { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - . = ALIGN(4); - _ebss = ABSOLUTE(.); - } > datamem - - /* Stabs debugging sections. */ - - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/boards/arm/nrf53/thingy53/scripts/flash_rptun_net.ld b/boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_net.ld similarity index 92% rename from boards/arm/nrf53/thingy53/scripts/flash_rptun_net.ld rename to boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_net.ld index 7feca55986..d4f0eff70c 100644 --- a/boards/arm/nrf53/thingy53/scripts/flash_rptun_net.ld +++ b/boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_net.ld @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/nrf53/thingy53/scripts/flash_rptun_net.ld +* boards/arm/nrf53/nrf5340-audio-dk/scripts/flash_net.ld * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,11 +18,18 @@ * ****************************************************************************/ +#include + +#ifdef CONFIG_RPTUN +# define RPTUN_SHMEM 0x8000 +#else +# define RPTUN_SHMEM 0 +#endif + MEMORY { app_progmem (rx) : ORIGIN = 0x00000000, LENGTH = 1024K - app_datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K-32K - shared (rwx) : ORIGIN = 0x20078000, LENGTH = 32K + app_datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K - RPTUN_SHMEM progmem (rx) : ORIGIN = 0x01000000, LENGTH = 256K datamem (rwx) : ORIGIN = 0x21000000, LENGTH = 64K } diff --git a/boards/arm/nrf53/nrf5340-dk/scripts/Make.defs b/boards/arm/nrf53/nrf5340-dk/scripts/Make.defs index 25088516b9..634299fccb 100644 --- a/boards/arm/nrf53/nrf5340-dk/scripts/Make.defs +++ b/boards/arm/nrf53/nrf5340-dk/scripts/Make.defs @@ -23,20 +23,12 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv8-m/Toolchain.defs ifeq ($(CONFIG_ARCH_CHIP_NRF5340_CPUAPP),y) -ifeq ($(CONFIG_RPTUN),y) -LDSCRIPT = flash_rptun_app.ld -else LDSCRIPT = flash_app.ld endif -endif ifeq ($(CONFIG_ARCH_CHIP_NRF5340_CPUNET),y) -ifeq ($(CONFIG_RPTUN),y) -LDSCRIPT = flash_rptun_net.ld -else LDSCRIPT = flash_net.ld endif -endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) diff --git a/boards/arm/nrf53/nrf5340-dk/scripts/flash_app.ld b/boards/arm/nrf53/nrf5340-dk/scripts/flash_app.ld index 4b60e8c816..310ec2aea9 100644 --- a/boards/arm/nrf53/nrf5340-dk/scripts/flash_app.ld +++ b/boards/arm/nrf53/nrf5340-dk/scripts/flash_app.ld @@ -18,10 +18,18 @@ * ****************************************************************************/ +#include + +#ifdef CONFIG_RPTUN +# define RPTUN_SHMEM 0x8000 +#else +# define RPTUN_SHMEM 0 +#endif + MEMORY { progmem (rx) : ORIGIN = 0x00000000, LENGTH = 1024K - datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K + datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K - RPTUN_SHMEM } OUTPUT_ARCH(arm) diff --git a/boards/arm/nrf53/nrf5340-dk/scripts/flash_net.ld b/boards/arm/nrf53/nrf5340-dk/scripts/flash_net.ld index e040fa14a6..06a9cbab85 100644 --- a/boards/arm/nrf53/nrf5340-dk/scripts/flash_net.ld +++ b/boards/arm/nrf53/nrf5340-dk/scripts/flash_net.ld @@ -18,10 +18,18 @@ * ****************************************************************************/ +#include + +#ifdef CONFIG_RPTUN +# define RPTUN_SHMEM 0x8000 +#else +# define RPTUN_SHMEM 0 +#endif + MEMORY { app_progmem (rx) : ORIGIN = 0x00000000, LENGTH = 1024K - app_datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K + app_datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K - RPTUN_SHMEM progmem (rx) : ORIGIN = 0x01000000, LENGTH = 256K datamem (rwx) : ORIGIN = 0x21000000, LENGTH = 64K } diff --git a/boards/arm/nrf53/nrf5340-dk/scripts/flash_rptun_app.ld b/boards/arm/nrf53/nrf5340-dk/scripts/flash_rptun_app.ld deleted file mode 100644 index c47e11993c..0000000000 --- a/boards/arm/nrf53/nrf5340-dk/scripts/flash_rptun_app.ld +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf53/nrf5340-dk/scripts/flash_rptun_app.ld - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -MEMORY -{ - progmem (rx) : ORIGIN = 0x00000000, LENGTH = 1024K - datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K-32K - shared (rwx) : ORIGIN = 0x20078000, LENGTH = 32K -} - -OUTPUT_ARCH(arm) -ENTRY(__start) /* Treat __start as the anchor for dead code stripping */ -EXTERN(_vectors) /* Force the vectors to be included in the output */ -SECTIONS -{ - .text : - { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > progmem - - .init_section : - { - _sinit = ABSOLUTE(.); - *(.init_array .init_array.*) - _einit = ABSOLUTE(.); - } > progmem - - .ARM.extab : - { - *(.ARM.extab*) - } > progmem - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : - { - *(.ARM.exidx*) - } > progmem - __exidx_end = ABSOLUTE(.); - - _eronly = ABSOLUTE(.); - - .data : - { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - . = ALIGN(4); - _edata = ABSOLUTE(.); - } > datamem AT > progmem - - /* BSS */ - - .bss : - { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - . = ALIGN(4); - _ebss = ABSOLUTE(.); - } > datamem - - /* Shared memory */ - - .shmem : - { - *(.shmem) - } > shared - - /* Stabs debugging sections. */ - - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/boards/arm/nrf53/nrf5340-dk/scripts/flash_rptun_net.ld b/boards/arm/nrf53/nrf5340-dk/scripts/flash_rptun_net.ld deleted file mode 100644 index 1bb1d734e9..0000000000 --- a/boards/arm/nrf53/nrf5340-dk/scripts/flash_rptun_net.ld +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf53/nrf5340-dk/scripts/flash_rptun_net.ld - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -MEMORY -{ - app_progmem (rx) : ORIGIN = 0x00000000, LENGTH = 1024K - app_datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K-32K - shared (rwx) : ORIGIN = 0x20078000, LENGTH = 32K - progmem (rx) : ORIGIN = 0x01000000, LENGTH = 256K - datamem (rwx) : ORIGIN = 0x21000000, LENGTH = 64K -} - -OUTPUT_ARCH(arm) -ENTRY(__start) /* Treat __start as the anchor for dead code stripping */ -EXTERN(_vectors) /* Force the vectors to be included in the output */ -SECTIONS -{ - .text : - { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > progmem - - .init_section : - { - _sinit = ABSOLUTE(.); - *(.init_array .init_array.*) - _einit = ABSOLUTE(.); - } > progmem - - .ARM.extab : - { - *(.ARM.extab*) - } > progmem - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : - { - *(.ARM.exidx*) - } > progmem - __exidx_end = ABSOLUTE(.); - - _eronly = ABSOLUTE(.); - - .data : - { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - . = ALIGN(4); - _edata = ABSOLUTE(.); - } > datamem AT > progmem - - /* BSS */ - - .bss : - { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - . = ALIGN(4); - _ebss = ABSOLUTE(.); - } > datamem - - /* Stabs debugging sections. */ - - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -} diff --git a/boards/arm/nrf53/thingy53/scripts/Make.defs b/boards/arm/nrf53/thingy53/scripts/Make.defs index 9418115034..d56c3e9489 100644 --- a/boards/arm/nrf53/thingy53/scripts/Make.defs +++ b/boards/arm/nrf53/thingy53/scripts/Make.defs @@ -23,20 +23,12 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv8-m/Toolchain.defs ifeq ($(CONFIG_ARCH_CHIP_NRF5340_CPUAPP),y) -ifeq ($(CONFIG_RPTUN),y) -LDSCRIPT = flash_rptun_app.ld -else LDSCRIPT = flash_app.ld endif -endif ifeq ($(CONFIG_ARCH_CHIP_NRF5340_CPUNET),y) -ifeq ($(CONFIG_RPTUN),y) -LDSCRIPT = flash_rptun_net.ld -else LDSCRIPT = flash_net.ld endif -endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) diff --git a/boards/arm/nrf53/thingy53/scripts/flash_app.ld b/boards/arm/nrf53/thingy53/scripts/flash_app.ld index 8d722826a9..79aaf2abf1 100644 --- a/boards/arm/nrf53/thingy53/scripts/flash_app.ld +++ b/boards/arm/nrf53/thingy53/scripts/flash_app.ld @@ -18,10 +18,18 @@ * ****************************************************************************/ +#include + +#ifdef CONFIG_RPTUN +# define RPTUN_SHMEM 0x8000 +#else +# define RPTUN_SHMEM 0 +#endif + MEMORY { progmem (rx) : ORIGIN = 0x00000000, LENGTH = 1024K - datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K + datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K - RPTUN_SHMEM } OUTPUT_ARCH(arm) diff --git a/boards/arm/nrf53/thingy53/scripts/flash_net.ld b/boards/arm/nrf53/thingy53/scripts/flash_net.ld index b8f5d95409..2ff40509a2 100644 --- a/boards/arm/nrf53/thingy53/scripts/flash_net.ld +++ b/boards/arm/nrf53/thingy53/scripts/flash_net.ld @@ -18,10 +18,18 @@ * ****************************************************************************/ +#include + +#ifdef CONFIG_RPTUN +# define RPTUN_SHMEM 0x8000 +#else +# define RPTUN_SHMEM 0 +#endif + MEMORY { app_progmem (rx) : ORIGIN = 0x00000000, LENGTH = 1024K - app_datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K + app_datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K - RPTUN_SHMEM progmem (rx) : ORIGIN = 0x01000000, LENGTH = 256K datamem (rwx) : ORIGIN = 0x21000000, LENGTH = 64K } diff --git a/boards/arm/nrf53/thingy53/scripts/flash_rptun_app.ld b/boards/arm/nrf53/thingy53/scripts/flash_rptun_app.ld deleted file mode 100644 index c4d7449799..0000000000 --- a/boards/arm/nrf53/thingy53/scripts/flash_rptun_app.ld +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf53/thingy53/scripts/flash_rptun_app.ld - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -MEMORY -{ - progmem (rx) : ORIGIN = 0x00000000, LENGTH = 1024K - datamem (rwx) : ORIGIN = 0x20000000, LENGTH = 512K-32K - shared (rwx) : ORIGIN = 0x20078000, LENGTH = 32K -} - -OUTPUT_ARCH(arm) -ENTRY(__start) /* Treat __start as the anchor for dead code stripping */ -EXTERN(_vectors) /* Force the vectors to be included in the output */ -SECTIONS -{ - .text : - { - _stext = ABSOLUTE(.); - *(.vectors) - *(.text .text.*) - *(.fixup) - *(.gnu.warning) - *(.rodata .rodata.*) - *(.gnu.linkonce.t.*) - *(.glue_7) - *(.glue_7t) - *(.got) - *(.gcc_except_table) - *(.gnu.linkonce.r.*) - _etext = ABSOLUTE(.); - } > progmem - - .init_section : - { - _sinit = ABSOLUTE(.); - *(.init_array .init_array.*) - _einit = ABSOLUTE(.); - } > progmem - - .ARM.extab : - { - *(.ARM.extab*) - } > progmem - - __exidx_start = ABSOLUTE(.); - .ARM.exidx : - { - *(.ARM.exidx*) - } > progmem - __exidx_end = ABSOLUTE(.); - - _eronly = ABSOLUTE(.); - - .data : - { - _sdata = ABSOLUTE(.); - *(.data .data.*) - *(.gnu.linkonce.d.*) - CONSTRUCTORS - . = ALIGN(4); - _edata = ABSOLUTE(.); - } > datamem AT > progmem - - /* BSS */ - - .bss : - { - _sbss = ABSOLUTE(.); - *(.bss .bss.*) - *(.gnu.linkonce.b.*) - *(COMMON) - . = ALIGN(4); - _ebss = ABSOLUTE(.); - } > datamem - - /* Shared memory */ - - .shmem : - { - *(.shmem) - } > shared - - /* Stabs debugging sections. */ - - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_info 0 : { *(.debug_info) } - .debug_line 0 : { *(.debug_line) } - .debug_pubnames 0 : { *(.debug_pubnames) } - .debug_aranges 0 : { *(.debug_aranges) } -}