Skip to content
Permalink
Browse files

linker: Port usage of custom-sections to use Cmake

Mark custom-sections as deprecated

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
  • Loading branch information...
oyvindronningstad authored and nashif committed Mar 20, 2019
1 parent 6d00394 commit 901c0a1cfd8929449c03371ba47db8da3e880cf8
@@ -150,20 +150,23 @@ config CUSTOM_LINKER_SCRIPT
Zephyr.

config CUSTOM_RODATA_LD
bool "Include custom-rodata.ld"
bool "(DEPRECATED) Include custom-rodata.ld"
help
Note: This is deprecated, use Cmake function zephyr_linker_sources() instead.
Include a customized linker script fragment for inserting additional
data and linker directives into the rodata section.

config CUSTOM_RWDATA_LD
bool "Include custom-rwdata.ld"
bool "(DEPRECATED) Include custom-rwdata.ld"
help
Note: This is deprecated, use Cmake function zephyr_linker_sources() instead.
Include a customized linker script fragment for inserting additional
data and linker directives into the data section.

config CUSTOM_SECTIONS_LD
bool "Include custom-sections.ld"
bool "(DEPRECATED) Include custom-sections.ld"
help
Note: This is deprecated, use Cmake function zephyr_linker_sources() instead.
Include a customized linker script fragment for inserting additional
arbitrary sections.

@@ -18,3 +18,5 @@ zephyr_code_relocate(src/test_file3.c SRAM_DATA)
zephyr_code_relocate(src/test_file3.c SRAM2_BSS)

zephyr_code_relocate(../../../kernel/sem.c SRAM)

zephyr_linker_sources(SECTIONS custom-sections.ld)
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: Apache-2.0 */

SECTION_DATA_PROLOGUE(_CUSTOM_SECTION_NAME2,,)
{
KEEP(*(".custom_section.*"));
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
SECTION_DATA_PROLOGUE(_CUSTOM_SECTION_NAME2,,)
{
KEEP(*(".custom_section.*"));
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
@@ -1,5 +1,4 @@
CONFIG_CODE_DATA_RELOCATION=y
CONFIG_HAVE_CUSTOM_LINKER_SCRIPT=y
CONFIG_CUSTOM_LINKER_SCRIPT="linker_arm_sram2.ld"
CONFIG_CUSTOM_SECTIONS_LD=y
CONFIG_COVERAGE=n
@@ -5,10 +5,7 @@
config SOC_OPENISA_RV32M1_RISCV32
bool "OpenISA RV32M1 RISC-V cores"
depends on RISCV32
# The following depends is due to limitations in the linker script.
# It's not inherent to the chip itself.
depends on !CUSTOM_RODATA_LD && !CUSTOM_RWDATA_LD
# The following select is also due to limitations in the linker script.
# The following select is due to limitations in the linker script.
# (We can't make it a 'depends on' without causing a dependency loop).
select XIP
select HAS_RV32M1_LPUART

0 comments on commit 901c0a1

Please sign in to comment.
You can’t perform that action at this time.