arc: linker.ld modified to handle DRAM configuration as well
For EM Starter Kit, one of the SOC choices has DRAM and no FLASH. If FLASH_SIZE is 0, the linker command file will create SRAM, ICCM and DCCM memories (and no FLASH). SRAM is really DRAM. Also, the linker.ld file is extended to handle microkernel objects. linker_harvard.ld has "all rights reserved". added to banner. Change-Id: Ia433578b94ce91722f3670819f44befafeecf878 Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
This commit is contained in:
parent
95dd06737f
commit
568101259d
2 changed files with 59 additions and 2 deletions
|
@ -32,7 +32,7 @@
|
||||||
#include <linker-tool.h>
|
#include <linker-tool.h>
|
||||||
|
|
||||||
/* physical address of RAM */
|
/* physical address of RAM */
|
||||||
#ifdef CONFIG_XIP
|
#if defined(CONFIG_XIP) && (FLASH_SIZE != 0)
|
||||||
#define ROMABLE_REGION FLASH
|
#define ROMABLE_REGION FLASH
|
||||||
#define RAMABLE_REGION SRAM
|
#define RAMABLE_REGION SRAM
|
||||||
#else
|
#else
|
||||||
|
@ -47,9 +47,19 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MEMORY {
|
MEMORY {
|
||||||
|
#if (FLASH_SIZE != 0)
|
||||||
FLASH (rx) : ORIGIN = FLASH_START, LENGTH = FLASH_SIZE*1k
|
FLASH (rx) : ORIGIN = FLASH_START, LENGTH = FLASH_SIZE*1k
|
||||||
SRAM (rwx) : ORIGIN = SRAM_START, LENGTH = SRAM_SIZE*1k
|
SRAM (rwx) : ORIGIN = SRAM_START, LENGTH = SRAM_SIZE*1k
|
||||||
DCCM (rw) : ORIGIN = DCCM_START, LENGTH = DCCM_SIZE*1k
|
DCCM (rw) : ORIGIN = DCCM_START, LENGTH = DCCM_SIZE*1k
|
||||||
|
#else
|
||||||
|
/*
|
||||||
|
* For those targets that have no FLASH, create ICCM, SRAM and DCCM memories.
|
||||||
|
* NOTE: SRAM may actually be DRAM but there is not a symbol for DRAM yet.
|
||||||
|
*/
|
||||||
|
ICCM (rx) : ORIGIN = ICCM_START, LENGTH = ICCM_SIZE*1k
|
||||||
|
SRAM (rwx) : ORIGIN = SRAM_START, LENGTH = SRAM_SIZE*1k
|
||||||
|
DCCM (rw) : ORIGIN = DCCM_START, LENGTH = DCCM_SIZE*1k
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS {
|
SECTIONS {
|
||||||
|
@ -190,6 +200,53 @@ SECTIONS {
|
||||||
DEVICE_INIT_SECTIONS()
|
DEVICE_INIT_SECTIONS()
|
||||||
} GROUP_LINK_IN(RAMABLE_REGION)
|
} GROUP_LINK_IN(RAMABLE_REGION)
|
||||||
|
|
||||||
|
SECTION_PROLOGUE (_k_task_list, (OPTIONAL),)
|
||||||
|
{
|
||||||
|
_k_task_list_start = .;
|
||||||
|
*(._k_task_list.public.*)
|
||||||
|
*(._k_task_list.private.*)
|
||||||
|
_k_task_list_idle_start = .;
|
||||||
|
*(._k_task_list.idle.*)
|
||||||
|
KEEP(*(SORT_BY_NAME("._k_task_list*")))
|
||||||
|
_k_task_list_end = .;
|
||||||
|
} GROUP_LINK_IN(RAMABLE_REGION)
|
||||||
|
|
||||||
|
SECTION_PROLOGUE (_k_task_ptr, (OPTIONAL),)
|
||||||
|
{
|
||||||
|
_k_task_ptr_start = .;
|
||||||
|
*(._k_task_ptr.public.*)
|
||||||
|
*(._k_task_ptr.private.*)
|
||||||
|
*(._k_task_ptr.idle.*)
|
||||||
|
KEEP(*(SORT_BY_NAME("._k_task_ptr*")))
|
||||||
|
_k_task_ptr_end = .;
|
||||||
|
} GROUP_LINK_IN(RAMABLE_REGION)
|
||||||
|
|
||||||
|
SECTION_PROLOGUE (_k_pipe_ptr, (OPTIONAL),)
|
||||||
|
{
|
||||||
|
_k_pipe_ptr_start = .;
|
||||||
|
*(._k_pipe_ptr.public.*)
|
||||||
|
*(._k_pipe_ptr.private.*)
|
||||||
|
KEEP(*(SORT_BY_NAME("._k_pipe_ptr*")))
|
||||||
|
_k_pipe_ptr_end = .;
|
||||||
|
} GROUP_LINK_IN(RAMABLE_REGION)
|
||||||
|
|
||||||
|
SECTION_PROLOGUE (_k_mem_map_ptr, (OPTIONAL),)
|
||||||
|
{
|
||||||
|
_k_mem_map_ptr_start = .;
|
||||||
|
*(._k_mem_map_ptr.public.*)
|
||||||
|
*(._k_mem_map_ptr.private.*)
|
||||||
|
KEEP(*(SORT_BY_NAME("._k_mem_map_ptr*")))
|
||||||
|
_k_mem_map_ptr_end = .;
|
||||||
|
} GROUP_LINK_IN(RAMABLE_REGION)
|
||||||
|
|
||||||
|
SECTION_PROLOGUE(_k_event_list, (OPTIONAL),)
|
||||||
|
{
|
||||||
|
_k_event_list_start = .;
|
||||||
|
*(._k_event_list.event.*)
|
||||||
|
KEEP(*(SORT_BY_NAME("._k_event_list*")))
|
||||||
|
_k_event_list_end = .;
|
||||||
|
} GROUP_LINK_IN(RAMABLE_REGION)
|
||||||
|
|
||||||
__data_ram_end = .;
|
__data_ram_end = .;
|
||||||
|
|
||||||
SECTION_PROLOGUE(_BSS_SECTION_NAME,(NOLOAD),) {
|
SECTION_PROLOGUE(_BSS_SECTION_NAME,(NOLOAD),) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 Synopsys, Inc.
|
* Copyright (c) 2016 Synopsys, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue