Skip to content

Commit

Permalink
linker script plumbing
Browse files Browse the repository at this point in the history
  • Loading branch information
fb committed Apr 14, 2021
1 parent fe2890a commit 0325f50
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions LPC812.ld
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/* Linker script for mbed LPC812-GCC-ARM based on LPC824.ld */

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

STACK_SIZE = MBED_BOOT_STACK_SIZE;
STACK_SIZE = 0x400;

/* Linker script to configure memory regions. */
MEMORY
Expand Down Expand Up @@ -42,6 +38,16 @@ MEMORY
*/
ENTRY(Reset_Handler)

PROVIDE(NMI_Handler = BusyDummy_Handler);
PROVIDE(HardFault_Handler = BusyDummy_Handler);
PROVIDE(MemManage_Handler = BusyDummy_Handler);
PROVIDE(BusFault_Handler = BusyDummy_Handler);
PROVIDE(UsageFault_Handler = BusyDummy_Handler);
PROVIDE(SVC_Handler = Dummy_Handler);
PROVIDE(DebugMon_Handler = Dummy_Handler);
PROVIDE(PendSV_Handler = Dummy_Handler);
PROVIDE(SysTick_Handler = Dummy_Handler);

SECTIONS
{
.text :
Expand Down Expand Up @@ -72,6 +78,7 @@ SECTIONS

KEEP(*(.eh_frame*))
} > FLASH
__text_end = .;

.ARM.extab :
{
Expand All @@ -89,7 +96,7 @@ SECTIONS

.data : AT (__etext)
{
__data_start__ = .;
__data_start = .;
*(vtable)
*(.data*)

Expand Down Expand Up @@ -119,14 +126,16 @@ SECTIONS
__data_end__ = .;

} > RAM
__data_size = SIZEOF(.data);

.bss :
{
__bss_start__ = .;
__bss_start = .;
*(.bss*)
*(COMMON)
__bss_end__ = .;
} > RAM
__bss_size = SIZEOF(.data);

.heap :
{
Expand Down

0 comments on commit 0325f50

Please sign in to comment.