mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-04 21:33:52 -04:00
Add starting point for IGLOO2 RISV-V demo project.
This commit is contained in:
parent
483f4a8c4b
commit
9119e1e0e3
42 changed files with 13068 additions and 0 deletions
|
@ -0,0 +1,137 @@
|
|||
/*******************************************************************************
|
||||
* (c) Copyright 2016-2018 Microsemi SoC Products Group. All rights reserved.
|
||||
*
|
||||
* file name : microsemi-riscv-igloo2.ld
|
||||
* Mi-V soft processor linker script for creating a SoftConsole downloadable
|
||||
* image executing in eNVM.
|
||||
*
|
||||
* This linker script assumes that the eNVM is connected at on the Mi-V soft
|
||||
* processor memory space.
|
||||
*
|
||||
* SVN $Revision: 9661 $
|
||||
* SVN $Date: 2018-01-15 16:13:33 +0530 (Mon, 15 Jan 2018) $
|
||||
*/
|
||||
|
||||
OUTPUT_ARCH( "riscv" )
|
||||
ENTRY(_start)
|
||||
|
||||
|
||||
MEMORY
|
||||
{
|
||||
envm (rx) : ORIGIN = 0x60000000, LENGTH = 240k
|
||||
ram (rwx) : ORIGIN = 0x80000000, LENGTH = 64k
|
||||
}
|
||||
|
||||
RAM_START_ADDRESS = 0x80000000; /* Must be the same value MEMORY region ram ORIGIN above. */
|
||||
RAM_SIZE = 64k; /* Must be the same value MEMORY region ram LENGTH above. */
|
||||
STACK_SIZE = 2k; /* needs to be calculated for your application */
|
||||
HEAP_SIZE = 2k; /* needs to be calculated for your application */
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text : ALIGN(0x10)
|
||||
{
|
||||
KEEP (*(SORT_NONE(.text.entry)))
|
||||
. = ALIGN(0x10);
|
||||
*(.text .text.* .gnu.linkonce.t.*)
|
||||
*(.plt)
|
||||
. = ALIGN(0x10);
|
||||
|
||||
KEEP (*crtbegin.o(.ctors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*crtend.o(.ctors))
|
||||
KEEP (*crtbegin.o(.dtors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*crtend.o(.dtors))
|
||||
|
||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
||||
*(.gcc_except_table)
|
||||
*(.eh_frame_hdr)
|
||||
*(.eh_frame)
|
||||
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP (*(.fini_array))
|
||||
KEEP (*(SORT(.fini_array.*)))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
. = ALIGN(0x10);
|
||||
|
||||
} >envm
|
||||
|
||||
/* short/global data section */
|
||||
.sdata : ALIGN(0x10)
|
||||
{
|
||||
__sdata_load = LOADADDR(.sdata);
|
||||
__sdata_start = .;
|
||||
PROVIDE( __global_pointer$ = . + 0x800);
|
||||
*(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2)
|
||||
*(.srodata*)
|
||||
*(.sdata .sdata.* .gnu.linkonce.s.*)
|
||||
. = ALIGN(0x10);
|
||||
__sdata_end = .;
|
||||
} >ram AT>envm
|
||||
|
||||
/* data section */
|
||||
.data : ALIGN(0x10)
|
||||
{
|
||||
__data_load = LOADADDR(.data);
|
||||
__data_start = .;
|
||||
*(.got.plt) *(.got)
|
||||
*(.shdata)
|
||||
*(.data .data.* .gnu.linkonce.d.*)
|
||||
. = ALIGN(0x10);
|
||||
__data_end = .;
|
||||
} >ram AT>envm
|
||||
|
||||
/* sbss section */
|
||||
.sbss : ALIGN(0x10)
|
||||
{
|
||||
__sbss_start = .;
|
||||
*(.sbss .sbss.* .gnu.linkonce.sb.*)
|
||||
*(.scommon)
|
||||
. = ALIGN(0x10);
|
||||
__sbss_end = .;
|
||||
} > ram
|
||||
|
||||
/* sbss section */
|
||||
.bss : ALIGN(0x10)
|
||||
{
|
||||
__bss_start = .;
|
||||
*(.shbss)
|
||||
*(.bss .bss.* .gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(0x10);
|
||||
__bss_end = .;
|
||||
} > ram
|
||||
|
||||
/* End of uninitialized data segment */
|
||||
_end = .;
|
||||
|
||||
.heap : ALIGN(0x10)
|
||||
{
|
||||
__heap_start = .;
|
||||
. += HEAP_SIZE;
|
||||
__heap_end = .;
|
||||
. = ALIGN(0x10);
|
||||
_heap_end = __heap_end;
|
||||
} > ram
|
||||
|
||||
.stack : ALIGN(0x10)
|
||||
{
|
||||
__stack_bottom = .;
|
||||
. += STACK_SIZE;
|
||||
__stack_top = .;
|
||||
} > ram
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue