]> rtime.felk.cvut.cz Git - sysless.git/commitdiff
Added ld script to run application from Flash without external RAM.
authorpisa <sojkam1@fel.cvut.cz>
Tue, 25 Oct 2005 22:05:00 +0000 (22:05 +0000)
committerpisa <sojkam1@fel.cvut.cz>
Tue, 25 Oct 2005 22:05:00 +0000 (22:05 +0000)
darcs-hash:20051025220540-a67a6-e68ae966842a40f06e973a5cadc724a618ce92c1.gz

common/board/h8canusb/libs/h8canusb.ld-flashnoram [new file with mode: 0644]

diff --git a/common/board/h8canusb/libs/h8canusb.ld-flashnoram b/common/board/h8canusb/libs/h8canusb.ld-flashnoram
new file mode 100644 (file)
index 0000000..a71b8e5
--- /dev/null
@@ -0,0 +1,88 @@
+/* linker script for applications running from FLASH */
+
+INCLUDE "h8canusb.ld-cfg"
+
+/* PROVIDE ( sym = val ); */
+
+PROVIDE( ___stack_top = ( __iram0_end & ~ 3 ) - 4 );
+/*PROVIDE( ___heap_end = __ram_end );*/
+PROVIDE( ___heap_end = __iram0_end - 0x200 );
+
+STARTUP(crt0.o)
+
+SECTIONS
+{
+       .text :
+       {
+         . = ALIGN( 4 ) ;
+         text_start = . ;
+         LONG( ABSOLUTE( _start ) + 0x5a000000 ) /* JMP _start */
+/*       KEEP (crt0.o(.text)) */
+         . = ALIGN( 4 ) ;
+         ___boot_fn_start = ALIGN( 0x4 ) ;
+          KEEP (*boot_fn.o(.text))
+         KEEP (*boot_fn.o(.rodata))
+         . = ALIGN( 4 ) ;
+         ___boot_fn_end = ALIGN( 0x4 ) ;
+         *(.text)
+         *(.rodata)
+         . = ALIGN( 4 ) ;
+         ___nls_str_start = ALIGN( 0x4 ) ;
+         *(.nls_str)                           
+         ___nls_str_end = ALIGN( 0x4 ) ;
+         *(.strings)
+         _etext = ALIGN( 0x10 ) ;
+       } > flashusr
+
+       .tors : 
+       {
+         ___ctors = . ;
+         *(.ctors)
+         ___ctors_end = . ;
+         ___dtors = . ;
+         *(.dtors)
+         ___dtors_end = . ;
+         . = ALIGN( 0x10 ) ;
+         ___data_lma = ALIGN( 0x10 ) ;
+       }  > flashusr
+
+       .data :
+           AT ( ADDR( .tors ) + SIZEOF( .tors ) )
+       {
+         _data_start = . ;
+         *(.data)
+         . = ALIGN( 0x4 ) ;
+         _edata = ALIGN( 0x4 ) ;
+       } > iram0 /*at> flashusr*/
+
+       /* ___data_lma = LOADADDR(.data) ; */
+
+       .bss :
+       {
+         _bss_start = ALIGN( 0x10 ) ;
+         *(.bss)
+         *(COMMON)
+         . = ALIGN( 0x4 ) ;
+         _end = ALIGN( 0x4 ) ;
+       } > iram0
+
+       .tiny : 
+       {
+         *(.tiny)
+       }  > iram0
+       
+       .eight : 
+       {
+         *(.eight)
+       }  > eight
+
+       .stab  0 (NOLOAD) : 
+       {
+         [ .stab ]
+       }
+
+       .stabstr  0 (NOLOAD) :
+       {
+         [ .stabstr ]
+       }
+}