Skip to content

Commit

Permalink
examples:update the gcc linker script file.
Browse files Browse the repository at this point in the history
  • Loading branch information
nongxiaoming committed Sep 1, 2014
1 parent 8ed2f81 commit 812f306
Show file tree
Hide file tree
Showing 47 changed files with 1,317 additions and 330 deletions.
35 changes: 28 additions & 7 deletions software/rtthread_examples/examples/0_base_kernel/lpc40xx_rom.ld
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
/*
* linker script for LPC4088 (512kB Flash, 48kB + 48kB SRAM ) with GNU ld
* linker script for LPC4088 (512kB Flash, 96kB + 32kB SRAM ) with GNU ld
* bernard.xiong 2012-12-18
*/

/* Program Entry, set to mark it as "used" and avoid gc */
MEMORY
{
CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000
DATA (rw) : ORIGIN = 0x10000000, LENGTH = 0x00010000
CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000 /* base code section 512K */
DATA1 (rw) : ORIGIN = 0x10000000, LENGTH = 0x00010000 /* base data section 96K */
DATA2 (rw) : ORIGIN = 0x20000000, LENGTH = 0x00002000 /* usb ram section 8K */
DATA3 (rw) : ORIGIN = 0x20002000, LENGTH = 0x00002000 /* mci ram section 8K */
DATA4 (rw) : ORIGIN = 0x20004000, LENGTH = 0x00004000 /* eth ram section 16K */
}
ENTRY(Reset_Handler)
_system_stack_size = 0x200;
Expand Down Expand Up @@ -80,14 +83,14 @@ SECTIONS
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
} >DATA
} > DATA1

.stack :
{
. = . + _system_stack_size;
. = ALIGN(4);
_estack = .;
} >DATA
} > DATA1

__bss_start = .;
.bss :
Expand All @@ -104,11 +107,29 @@ SECTIONS
/* This is used by the startup in order to initialize the .bss secion */
_ebss = . ;
*(.bss.init)
} > DATA
} > DATA1
__bss_end = .;

_end = .;


.usb_stack (NOLOAD) :
{
. = ALIGN(4);
*(USB_RAM)
} > DATA2

.mci_buf (NOLOAD) :
{
. = ALIGN(4);
*(MCI_RAM)
} > DATA3

.eth_buf (NOLOAD) :
{
. = ALIGN(4);
*(ETH_RAM)
} > DATA4

/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
Expand Down
37 changes: 29 additions & 8 deletions software/rtthread_examples/examples/0_usart/lpc40xx_rom.ld
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
/*
* linker script for LPC4088 (512kB Flash, 48kB + 48kB SRAM ) with GNU ld
* linker script for LPC4088 (512kB Flash, 96kB + 32kB SRAM ) with GNU ld
* bernard.xiong 2012-12-18
*/

/* Program Entry, set to mark it as "used" and avoid gc */
MEMORY
{
CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000
DATA (rw) : ORIGIN = 0x10000000, LENGTH = 0x00010000
CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000 /* base code section 512K */
DATA1 (rw) : ORIGIN = 0x10000000, LENGTH = 0x00010000 /* base data section 96K */
DATA2 (rw) : ORIGIN = 0x20000000, LENGTH = 0x00002000 /* usb ram section 8K */
DATA3 (rw) : ORIGIN = 0x20002000, LENGTH = 0x00002000 /* mci ram section 8K */
DATA4 (rw) : ORIGIN = 0x20004000, LENGTH = 0x00004000 /* eth ram section 16K */
}
ENTRY(Reset_Handler)
_system_stack_size = 0x200;
Expand All @@ -33,7 +36,7 @@ SECTIONS
KEEP(*(RTMSymTab))
__rtmsymtab_end = .;

/* section information for finsh shell */
/* section information for finsh shell */
. = ALIGN(4);
__fsymtab_start = .;
KEEP(*(FSymTab))
Expand Down Expand Up @@ -80,14 +83,14 @@ SECTIONS
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
} >DATA
} > DATA1

.stack :
{
. = . + _system_stack_size;
. = ALIGN(4);
_estack = .;
} >DATA
} > DATA1

__bss_start = .;
.bss :
Expand All @@ -104,11 +107,29 @@ SECTIONS
/* This is used by the startup in order to initialize the .bss secion */
_ebss = . ;
*(.bss.init)
} > DATA
} > DATA1
__bss_end = .;

_end = .;


.usb_stack (NOLOAD) :
{
. = ALIGN(4);
*(USB_RAM)
} > DATA2

.mci_buf (NOLOAD) :
{
. = ALIGN(4);
*(MCI_RAM)
} > DATA3

.eth_buf (NOLOAD) :
{
. = ALIGN(4);
*(ETH_RAM)
} > DATA4

/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
Expand Down
35 changes: 28 additions & 7 deletions software/rtthread_examples/examples/1_finsh/lpc40xx_rom.ld
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
/*
* linker script for LPC4088 (512kB Flash, 48kB + 48kB SRAM ) with GNU ld
* linker script for LPC4088 (512kB Flash, 96kB + 32kB SRAM ) with GNU ld
* bernard.xiong 2012-12-18
*/

/* Program Entry, set to mark it as "used" and avoid gc */
MEMORY
{
CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000
DATA (rw) : ORIGIN = 0x10000000, LENGTH = 0x00010000
CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000 /* base code section 512K */
DATA1 (rw) : ORIGIN = 0x10000000, LENGTH = 0x00010000 /* base data section 96K */
DATA2 (rw) : ORIGIN = 0x20000000, LENGTH = 0x00002000 /* usb ram section 8K */
DATA3 (rw) : ORIGIN = 0x20002000, LENGTH = 0x00002000 /* mci ram section 8K */
DATA4 (rw) : ORIGIN = 0x20004000, LENGTH = 0x00004000 /* eth ram section 16K */
}
ENTRY(Reset_Handler)
_system_stack_size = 0x200;
Expand Down Expand Up @@ -80,14 +83,14 @@ SECTIONS
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
} >DATA
} > DATA1

.stack :
{
. = . + _system_stack_size;
. = ALIGN(4);
_estack = .;
} >DATA
} > DATA1

__bss_start = .;
.bss :
Expand All @@ -104,11 +107,29 @@ SECTIONS
/* This is used by the startup in order to initialize the .bss secion */
_ebss = . ;
*(.bss.init)
} > DATA
} > DATA1
__bss_end = .;

_end = .;


.usb_stack (NOLOAD) :
{
. = ALIGN(4);
*(USB_RAM)
} > DATA2

.mci_buf (NOLOAD) :
{
. = ALIGN(4);
*(MCI_RAM)
} > DATA3

.eth_buf (NOLOAD) :
{
. = ALIGN(4);
*(ETH_RAM)
} > DATA4

/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
/*
* linker script for LPC4088 (512kB Flash, 48kB + 48kB SRAM ) with GNU ld
* linker script for LPC4088 (512kB Flash, 96kB + 32kB SRAM ) with GNU ld
* bernard.xiong 2012-12-18
*/

/* Program Entry, set to mark it as "used" and avoid gc */
MEMORY
{
CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000
DATA (rw) : ORIGIN = 0x10000000, LENGTH = 0x00010000
CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000 /* base code section 512K */
DATA1 (rw) : ORIGIN = 0x10000000, LENGTH = 0x00010000 /* base data section 96K */
DATA2 (rw) : ORIGIN = 0x20000000, LENGTH = 0x00002000 /* usb ram section 8K */
DATA3 (rw) : ORIGIN = 0x20002000, LENGTH = 0x00002000 /* mci ram section 8K */
DATA4 (rw) : ORIGIN = 0x20004000, LENGTH = 0x00004000 /* eth ram section 16K */
}
ENTRY(Reset_Handler)
_system_stack_size = 0x200;
Expand Down Expand Up @@ -80,14 +83,14 @@ SECTIONS
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
} >DATA
} > DATA1

.stack :
{
. = . + _system_stack_size;
. = ALIGN(4);
_estack = .;
} >DATA
} > DATA1

__bss_start = .;
.bss :
Expand All @@ -104,11 +107,29 @@ SECTIONS
/* This is used by the startup in order to initialize the .bss secion */
_ebss = . ;
*(.bss.init)
} > DATA
} > DATA1
__bss_end = .;

_end = .;


.usb_stack (NOLOAD) :
{
. = ALIGN(4);
*(USB_RAM)
} > DATA2

.mci_buf (NOLOAD) :
{
. = ALIGN(4);
*(MCI_RAM)
} > DATA3

.eth_buf (NOLOAD) :
{
. = ALIGN(4);
*(ETH_RAM)
} > DATA4

/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
/*
* linker script for LPC4088 (512kB Flash, 48kB + 48kB SRAM ) with GNU ld
* linker script for LPC4088 (512kB Flash, 96kB + 32kB SRAM ) with GNU ld
* bernard.xiong 2012-12-18
*/

/* Program Entry, set to mark it as "used" and avoid gc */
MEMORY
{
CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000
DATA (rw) : ORIGIN = 0x10000000, LENGTH = 0x00010000
CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000 /* base code section 512K */
DATA1 (rw) : ORIGIN = 0x10000000, LENGTH = 0x00010000 /* base data section 96K */
DATA2 (rw) : ORIGIN = 0x20000000, LENGTH = 0x00002000 /* usb ram section 8K */
DATA3 (rw) : ORIGIN = 0x20002000, LENGTH = 0x00002000 /* mci ram section 8K */
DATA4 (rw) : ORIGIN = 0x20004000, LENGTH = 0x00004000 /* eth ram section 16K */
}
ENTRY(Reset_Handler)
_system_stack_size = 0x200;
Expand Down Expand Up @@ -80,14 +83,14 @@ SECTIONS
. = ALIGN(4);
/* This is used by the startup in order to initialize the .data secion */
_edata = . ;
} >DATA
} > DATA1

.stack :
{
. = . + _system_stack_size;
. = ALIGN(4);
_estack = .;
} >DATA
} > DATA1

__bss_start = .;
.bss :
Expand All @@ -104,11 +107,29 @@ SECTIONS
/* This is used by the startup in order to initialize the .bss secion */
_ebss = . ;
*(.bss.init)
} > DATA
} > DATA1
__bss_end = .;

_end = .;


.usb_stack (NOLOAD) :
{
. = ALIGN(4);
*(USB_RAM)
} > DATA2

.mci_buf (NOLOAD) :
{
. = ALIGN(4);
*(MCI_RAM)
} > DATA3

.eth_buf (NOLOAD) :
{
. = ALIGN(4);
*(ETH_RAM)
} > DATA4

/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
Expand Down
Loading

0 comments on commit 812f306

Please sign in to comment.