mirror of https://github.com/ARMmbed/mbed-os.git
[LPC11U24] Take advantage of the full 8K of RAM
The linker command scripts/startup files used only 4K of RAM on this target.pull/17/head
parent
0c33d40fbb
commit
dd70336886
|
@ -6,9 +6,12 @@ LR_IROM1 0x00000000 0x8000 { ; load region size_region (32k)
|
|||
.ANY (+RO)
|
||||
}
|
||||
; 8_byte_aligned(48 vect * 4 bytes) = 8_byte_aligned(0xC0) = 0xC0
|
||||
; 8KB - 0xC0 = 0xF40
|
||||
RW_IRAM1 0x100000C0 0xF40 {
|
||||
; 8KB - 0xC0 = 0x1F40
|
||||
RW_IRAM1 0x100000C0 0x1F40 {
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
RW_IRAM2 0x20004000 0x800 { ; RW data, USB RAM
|
||||
.ANY (USBRAM)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ Stack_Size EQU 0x00000400
|
|||
EXPORT __initial_sp
|
||||
|
||||
Stack_Mem SPACE Stack_Size
|
||||
__initial_sp EQU 0x10001000 ; Top of RAM from LPC11U
|
||||
__initial_sp EQU 0x10002000 ; Top of RAM from LPC11U
|
||||
|
||||
|
||||
Heap_Size EQU 0x00000000
|
||||
|
|
|
@ -6,9 +6,12 @@ LR_IROM1 0x00000000 0x8000 { ; load region size_region (32k)
|
|||
.ANY (+RO)
|
||||
}
|
||||
; 8_byte_aligned(48 vect * 4 bytes) = 8_byte_aligned(0xC0) = 0xC0
|
||||
; 8KB - 0xC0 = 0xF40
|
||||
RW_IRAM1 0x100000C0 0xF40 {
|
||||
; 8KB - 0xC0 = 0x1F40
|
||||
RW_IRAM1 0x100000C0 0x1F40 {
|
||||
.ANY (+RW +ZI)
|
||||
}
|
||||
RW_IRAM2 0x20004000 0x800 { ; RW data, USB RAM
|
||||
.ANY (USBRAM)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
; *
|
||||
; *****************************************************************************/
|
||||
|
||||
__initial_sp EQU 0x10001000 ; Top of RAM from LPC11U
|
||||
__initial_sp EQU 0x10002000 ; Top of RAM from LPC11U
|
||||
|
||||
PRESERVE8
|
||||
THUMB
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 32K
|
||||
RAM (rwx) : ORIGIN = 0x100000C0, LENGTH = 0xF40
|
||||
RAM (rwx) : ORIGIN = 0x100000C0, LENGTH = 0x1F40
|
||||
USB_RAM (rwx): ORIGIN = 0x20004000, LENGTH = 0x800
|
||||
}
|
||||
|
||||
/* Linker script to place sections and symbol values. Should be used together
|
||||
|
|
|
@ -7,12 +7,12 @@ MEMORY
|
|||
{
|
||||
/* Define each memory region */
|
||||
MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 /* 32k */
|
||||
RamLoc4 (rwx) : ORIGIN = 0x100000C0, LENGTH = 0xF40 /* 4k */
|
||||
RamLoc8 (rwx) : ORIGIN = 0x100000C0, LENGTH = 0x1F40 /* 8k */
|
||||
RamUsb2 (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800 /* 2k */
|
||||
}
|
||||
/* Define a symbol for the top of each memory region */
|
||||
__top_MFlash32 = 0x0 + 0x8000;
|
||||
__top_RamLoc4 = 0x10000000 + 0x1000;
|
||||
__top_RamLoc8 = 0x10000000 + 0x2000;
|
||||
__top_RamUsb2 = 0x20004000 + 0x800;
|
||||
|
||||
ENTRY(ResetISR)
|
||||
|
@ -116,7 +116,7 @@ SECTIONS
|
|||
.uninit_RESERVED : ALIGN(4)
|
||||
{
|
||||
KEEP(*(.bss.$RESERVED*))
|
||||
} > RamLoc4
|
||||
} > RamLoc8
|
||||
|
||||
.data : ALIGN(4)
|
||||
{
|
||||
|
@ -126,7 +126,7 @@ SECTIONS
|
|||
*(.data*)
|
||||
. = ALIGN(4) ;
|
||||
_edata = .;
|
||||
} > RamLoc4 AT>MFlash32
|
||||
} > RamLoc8 AT>MFlash32
|
||||
|
||||
|
||||
.bss_RAM2 : ALIGN(4)
|
||||
|
@ -145,8 +145,8 @@ SECTIONS
|
|||
. = ALIGN(4) ;
|
||||
_ebss = .;
|
||||
PROVIDE(end = .);
|
||||
} > RamLoc4
|
||||
} > RamLoc8
|
||||
|
||||
PROVIDE(_pvHeapStart = .);
|
||||
PROVIDE(_vStackTop = __top_RamLoc4 - 0);
|
||||
PROVIDE(_vStackTop = __top_RamLoc8 - 0);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,8 @@ MEMORY
|
|||
{
|
||||
rom (rx) : ORIGIN = 0x00000000, LENGTH = 32K
|
||||
|
||||
ram (rwx) : ORIGIN = 0x100000C0, LENGTH = 0xF40
|
||||
ram (rwx) : ORIGIN = 0x100000C0, LENGTH = 0x1F40
|
||||
usb_ram (rwx) : ORIGIN = 0x20004000, LENGTH = 0x800
|
||||
}
|
||||
|
||||
/* These force the linker to search for particular symbols from
|
||||
|
|
Loading…
Reference in New Issue