]> rtime.felk.cvut.cz Git - sysless.git/blob - board/h8300/h8heli/libs/h8heli.ld-boot
Added h8heli board
[sysless.git] / board / h8300 / h8heli / libs / h8heli.ld-boot
1 /* linker script for inteligent boot block (for user-program-mode boot-loader in flash) */
2
3 INCLUDE "h8canusb.ld-cfg"
4
5 PROVIDE( ___stack_top = ( __iram0_end & ~ 3 ) - 4 );
6 /*PROVIDE( ___setup_board = _start);*/
7
8 STARTUP(crt0.o)
9 INPUT(bsp0common.o)
10 INPUT(bsp0hwinit.o setup_board.o)
11
12 SECTIONS
13 {
14         .fvector :
15         {
16           ___flashbb_vector = . ;
17           LONG( ABSOLUTE( ___setup_board ) )
18           *(.fvector)
19         } > flashvec
20         
21         .shadreg (NOLOAD) :
22         {
23           *(.shadreg)
24           . = ALIGN( 0x4 ) ;
25         } > iram0
26
27         .text :
28         {
29           text_start = . ;
30           KEEP (crt0.o(.text))
31           . = ALIGN( 4 ) ;
32           ___boot_fn_start = ALIGN( 0x4 ) ;
33           KEEP (*boot_fn.o(.text))
34           KEEP (*boot_fn.o(.rodata))
35           . = ALIGN( 4 ) ;
36           ___boot_fn_end = ALIGN( 0x4 ) ;
37           *(.text)
38           *(.rodata)                            
39           *(.strings)
40           . = ALIGN( 0x4 ) ;
41           _etext = ALIGN( 0x4 ) ;
42         } > flashbb
43
44         .tors : 
45         {
46           ___ctors = . ;
47           *(.ctors)
48           ___ctors_end = . ;
49           ___dtors = . ;
50           *(.dtors)
51           ___dtors_end = . ;
52           . = ALIGN( 0x4 ) ;
53           ___data_lma = ALIGN( 0x4 ) ;
54         }  > flashbb /*at> flashusr*/
55
56         .data :
57           AT ( ADDR( .tors ) + SIZEOF( .tors ) )
58         {
59           _data_start = . ;
60           *(.data)
61           . = ALIGN( 0x4 ) ;
62           _edata = ALIGN( 0x4 ) ;
63         } > iram1
64
65         /* ___data_lma = LOADADDR(.data) ; */
66         
67         .bss :
68         {
69           _bss_start = ALIGN( 0x10 ) ;
70           *(.bss)
71           *(COMMON)
72           . = ALIGN( 0x4 ) ;
73           _end = . ;
74         } > iram0
75         
76         .flashusr :
77         {
78           _usrprog_start = . ;
79         } > flashusr
80
81         .stab  0 (NOLOAD) : 
82         {
83           [ .stab ]
84         }
85
86         .stabstr  0 (NOLOAD) :
87         {
88           [ .stabstr ]
89         }
90 }