arm: linker.ld: Port KINETIS_FLASH_CONFIG to zephyr_linker_sources()

Add the .kinetis_flash_config via its own linker script snippet.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
This commit is contained in:
Øyvind Rønningstad 2019-11-28 17:01:00 +01:00 committed by Anas Nashif
commit f5fda5cfa1
4 changed files with 16 additions and 11 deletions

View file

@ -161,12 +161,6 @@ SECTIONS
*/
#include <snippets-text-start.ld>
#ifdef CONFIG_KINETIS_FLASH_CONFIG
. = CONFIG_KINETIS_FLASH_CONFIG_OFFSET;
KEEP(*(.kinetis_flash_config))
KEEP(*(".kinetis_flash_config.*"))
#endif
} GROUP_LINK_IN(ROMABLE_REGION)
#ifdef CONFIG_CODE_DATA_RELOCATION

View file

@ -158,11 +158,6 @@ SECTIONS
*/
#include <snippets-text-start.ld>
/* Kinetis has to write 16 bytes at 0x400 */
SKIP_TO_KINETIS_FLASH_CONFIG
KEEP(*(.kinetis_flash_config))
KEEP(*(".kinetis_flash_config.*"))
} GROUP_LINK_IN(ROMABLE_REGION)
#ifdef CONFIG_CODE_DATA_RELOCATION

View file

@ -3,3 +3,9 @@
zephyr_sources_ifdef(CONFIG_KINETIS_FLASH_CONFIG flash_configuration.c)
add_subdirectory(${SOC_SERIES})
zephyr_linker_sources_ifdef(CONFIG_KINETIS_FLASH_CONFIG
TEXT_START
SORT_KEY ${CONFIG_KINETIS_FLASH_CONFIG_OFFSET}
flash_config.ld
)

View file

@ -0,0 +1,10 @@
/*
* Copyright (c) 2019 NXP
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
. = CONFIG_KINETIS_FLASH_CONFIG_OFFSET;
KEEP(*(.kinetis_flash_config))
KEEP(*(".kinetis_flash_config.*"))