source: trunk/softs/tsar_boot/preloader.ld.in @ 873

Last change on this file since 873 was 804, checked in by cfuguet, 10 years ago

tsar_boot: using RESET_ADDRESS as preloader base address

  • The preloader base address is defined by RESET_ADDRESS instead of SEG_ROM_BASE.
  • Some platforms, like tsar_generic_leti, use the preloader but they do not have a ROM. Therefore the preloader is loaded during initialization in RAM.
File size: 754 bytes
Line 
1/**
2 * \file   : preloader.ld.in
3 * \author : Cesar Fuguet
4 * \date   : July 24, 2014
5 *
6 * \brief  : preloader ldscript template
7 * \note   : must be compiled with gcc to generate an instance
8 */
9
10#include <defs.h>
11
12/* Definition of the base address for code segment */
13
14seg_code_base = RESET_ADDRESS;
15seg_data_base = SEG_RAM_BASE + SEG_RAM_SIZE - RESET_STACK_SIZE - 0x4000;
16
17/* Grouping sections into segments */
18
19ENTRY(reset)
20
21SECTIONS
22{
23    . = seg_code_base;
24    .text :
25    {
26        *(.reset)
27        *(.rodata)
28        *(.rodata.*)
29        . = ALIGN(0x4);
30        dtb_addr = .;
31#if USE_DT == 1
32        INCLUDE "build/platform.ld";
33#endif
34    }
35
36    . = seg_data_base;
37    .bss ALIGN(0x4) (NOLOAD) :
38    {
39        *(.data)
40        *(.bss)
41    }
42}
Note: See TracBrowser for help on using the repository browser.