OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [common/] [neorv32.ld] - Diff between revs 36 and 58

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 36 Rev 58
Line 1... Line 1...
/* ################################################################################################# */
/* ################################################################################################# */
/* # << NEORV32 - RISC-V GCC Linker Script >>                                                      # */
/* # << NEORV32 - RISC-V GCC Linker Script >>                                                      # */
/* # ********************************************************************************************* # */
/* # ********************************************************************************************* # */
/* # BSD 3-Clause License                                                                          # */
/* # BSD 3-Clause License                                                                          # */
/* #                                                                                               # */
/* #                                                                                               # */
/* # Copyright (c) 2020, Stephan Nolting. All rights reserved.                                     # */
/* # Copyright (c) 2021, Stephan Nolting. All rights reserved.                                     # */
/* #                                                                                               # */
/* #                                                                                               # */
/* # Redistribution and use in source and binary forms, with or without modification, are          # */
/* # Redistribution and use in source and binary forms, with or without modification, are          # */
/* # permitted provided that the following conditions are met:                                     # */
/* # permitted provided that the following conditions are met:                                     # */
/* #                                                                                               # */
/* #                                                                                               # */
/* # 1. Redistributions of source code must retain the above copyright notice, this list of        # */
/* # 1. Redistributions of source code must retain the above copyright notice, this list of        # */
Line 46... Line 46...
ENTRY(_start)
ENTRY(_start)
SEARCH_DIR("/opt/riscv/riscv32-unknown-elf/lib"); SEARCH_DIR("=/opt/riscv/riscv64-unknown-linux-gnu/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
SEARCH_DIR("/opt/riscv/riscv32-unknown-elf/lib"); SEARCH_DIR("=/opt/riscv/riscv64-unknown-linux-gnu/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
 
 
/* ************************************************************************* */
/* ************************************************************************* */
/* NEORV32 memory configuration.                                             */
/* NEORV32 memory configuration.                                             */
/* Make sure this is sync with your processor/memory hardware configuration. */
/* Make sure this is sync with your processor/memory hardware configuration! */
 
/* ************************************************************************* */
 
/* "rom"   : instruction memory (IMEM) / bootloader ROM                      */
 
/* "ram"   : data memory (DMEM)                                              */
 
/* "iodev" : peripheral/IO devices (not used here; passed to crt0)           */
/* ************************************************************************* */
/* ************************************************************************* */
MEMORY
MEMORY
{
{
/* "rom" section: first value of ORIGIN/LENGHT => bootloader ROM; second value of ORIGIN/LENGHT => instruction memory */
/* "rom" section: first value of ORIGIN/LENGTH => bootloader ROM; second value of ORIGIN/LENGTH => instruction memory */
 
 
  rom  (rx) : ORIGIN = DEFINED(make_bootloader) ? 0xFFFF0000 : 0x00000000, LENGTH = DEFINED(make_bootloader) ? 4*1024 : 16*1024
  rom  (rx) : ORIGIN = DEFINED(make_bootloader) ? 0xFFFF0000 : 0x00000000, LENGTH = DEFINED(make_bootloader) ? 4*1024 : 16*1024
  ram (rwx) : ORIGIN = 0x80000000, LENGTH = 8*1024
  ram (rwx) : ORIGIN = 0x80000000, LENGTH = 8*1024
 
  iodev (rw) : ORIGIN = 0xFFFFFF00, LENGTH = 256
 
 
}
}
/* ************************************************************************* */
/* ************************************************************************* */
 
 
SECTIONS
SECTIONS
{
{
Line 283... Line 289...
  .debug_addr     0 : { *(.debug_addr) }
  .debug_addr     0 : { *(.debug_addr) }
  .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
  .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
 
 
 
 
  /* Provide further symbols for neorv32 crt0.elf */
  /* Provide further symbols for neorv32 crt0 */
  PROVIDE(__crt0_bss_start   = __bss_start);
  PROVIDE(__crt0_bss_start   = __bss_start);
  PROVIDE(__crt0_bss_end     = __BSS_END__);
  PROVIDE(__crt0_bss_end     = __BSS_END__);
  PROVIDE(__crt0_copy_data_src_begin = __etext + SIZEOF(.rodata));
  PROVIDE(__crt0_copy_data_src_begin = __etext + SIZEOF(.rodata));
  PROVIDE(__crt0_copy_data_dst_begin = __DATA_BEGIN__);
  PROVIDE(__crt0_copy_data_dst_begin = __DATA_BEGIN__);
  PROVIDE(__crt0_copy_data_dst_end   = __DATA_BEGIN__ + SIZEOF(.data));
  PROVIDE(__crt0_copy_data_dst_end   = __DATA_BEGIN__ + SIZEOF(.data));
 
  PROVIDE(__ctr0_io_space_begin = ORIGIN(iodev));
 
  PROVIDE(__ctr0_io_space_end   = ORIGIN(iodev) + LENGTH(iodev));
}
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.