Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
* By LPCXpresso v7.2.0 [Build 153] [2014-05-19] on Sat Jun 14 15:26:54 JST 2014
*/


#if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400
#endif

STACK_SIZE = MBED_BOOT_STACK_SIZE;

MEMORY
{
/* Define each memory region */
Expand Down Expand Up @@ -229,7 +236,32 @@ SECTIONS
. = ALIGN(8) ;
_end_noinit = .;
} > Ram0_32

PROVIDE(_pvHeapStart = .);
PROVIDE(_vStackTop = __top_Ram0_32 - 0);
.heap :
{
__end__ = .;
end = __end__;
*(.heap*)
. = ORIGIN(Ram0_32) + LENGTH(Ram0_32) - STACK_SIZE;
__HeapLimit = .;
} > Ram0_32


/* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign
* values to stack symbols later */
.stack_dummy :
{
*(.stack)
} > Ram0_32

/* Set stack top to end of RAM, and stack limit move down by
* size of stack_dummy section */
__StackTop = ORIGIN(Ram0_32) + LENGTH(Ram0_32);
__StackLimit = __StackTop - STACK_SIZE;
PROVIDE(__stack = __StackTop);

PROVIDE(__stack = __StackTop);
PROVIDE(_vStackTop = __StackTop);
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,22 @@ SECTIONS
__end__ = .;
end = __end__;
*(.heap*)
. = ORIGIN(Ram1_16) + LENGTH(Ram1_16);
__HeapLimit = .;
} > Ram0_16
} > Ram1_16


/* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign
* values to stack symbols later */
.stack_dummy :
{
*(.stack)
} > Ram0_16
} > Ram2_4

/* Set stack top to end of RAM, and stack limit move down by
* size of stack_dummy section */
__StackTop = ORIGIN(Ram0_16) + LENGTH(Ram0_16) + LENGTH(Ram1_16) + LENGTH(Ram2_4);
__StackTop = ORIGIN(Ram2_4) + LENGTH(Ram2_4);
__StackLimit = __StackTop - STACK_SIZE;
PROVIDE(__stack = __StackTop);

Expand Down
3 changes: 3 additions & 0 deletions targets/targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,9 @@
"SLEEP",
"SPI"
],
"macros": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we adding this macro?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As part of linker file updates #9571, it was discovered that these 2 targets needed additional fixes. Hence separate PR was created.

LPC11U68 had build issues - to resolve that Stack and heap section was added to linker file and MBED_FAULT_HANDLER_DISABLED was disabled.

Issues were communicated and resolved over mail with NXP.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this PR is approved, I can cherry-pick commits and apply them on #9571, if approval for 9571 takes more than a week

"MBED_FAULT_HANDLER_DISABLED"
],
"default_lib": "small",
"release_versions": ["2"],
"device_name": "LPC11U68JBD100"
Expand Down