]> rtime.felk.cvut.cz Git - sysless.git/blob - board/h8300/jt_usb1/libs/jt_usb1.ld-boot
Added minimal support for JT_USB1 board.
[sysless.git] / board / h8300 / jt_usb1 / libs / jt_usb1.ld-boot
1 /* linker script for inteligent boot block (for user-program-mode boot-loader in flash) */
2
3 INCLUDE "jt_usb1.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           _etext = ALIGN( 0x4 ) ;
40         } > flashbb
41
42         .tors : 
43         {
44           ___ctors = . ;
45           *(.ctors)
46           ___ctors_end = . ;
47           ___dtors = . ;
48           *(.dtors)
49           ___dtors_end = . ;
50           . = ALIGN( 0x4 ) ;
51           ___data_lma = ALIGN( 0x4 ) ;
52         }  > flashbb /*at> flashusr*/
53
54         .data :
55           AT ( ADDR( .tors ) + SIZEOF( .tors ) )
56         {
57           _data_start = . ;
58           *(.data)
59           . = ALIGN( 0x4 ) ;
60           _edata = ALIGN( 0x4 ) ;
61         } > iram1
62
63         /* ___data_lma = LOADADDR(.data) ; */
64         
65         .bss :
66         {
67           _bss_start = ALIGN( 0x10 ) ;
68           *(.bss)
69           *(COMMON)
70           . = ALIGN( 0x4 ) ;
71           _end = . ;
72         } > iram0
73         
74         .flashusr :
75         {
76           _usrprog_start = . ;
77         } > flashusr
78
79         .stab  0 (NOLOAD) : 
80         {
81           [ .stab ]
82         }
83
84         .stabstr  0 (NOLOAD) :
85         {
86           [ .stabstr ]
87         }
88 }