Skip to content

Commit 5747a45

Browse files
committed
One section for vectors and flash protection bits. The unused space is filled with 0xff
1 parent 82c5d7f commit 5747a45

File tree

2 files changed

+7
-21
lines changed

2 files changed

+7
-21
lines changed

libraries/mbed/targets/cmsis/TARGET_Freescale/TARGET_KL05Z/TOOLCHAIN_GCC_ARM/MKL05Z4.ld

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
MEMORY
66
{
7-
VECTORS (rx) : ORIGIN = 0x00000000, LENGTH = 0x00000400
8-
FLASH_PROTECTION (rx) : ORIGIN = 0x00000400, LENGTH = 0x00000010
7+
VECTORS (rx) : ORIGIN = 0x00000000, LENGTH = 0x00000410
98
FLASH (rx) : ORIGIN = 0x00000410, LENGTH = 32K - 0x00000410
109
RAM (rwx) : ORIGIN = 0x1FFFFC00, LENGTH = 4K - 0xC0
1110
}
@@ -44,17 +43,9 @@ SECTIONS
4443
{
4544
__vector_table = .;
4645
KEEP(*(.vector_table))
47-
*(.text.Reset_Handler)
48-
*(.text.System_Init)
4946
. = ALIGN(4);
5047
} > VECTORS
5148

52-
.flash_protect :
53-
{
54-
KEEP(*(.kinetis_flash_config_field))
55-
. = ALIGN(4);
56-
} > FLASH_PROTECTION
57-
5849
.text :
5950
{
6051
*(.text*)

libraries/mbed/targets/cmsis/TARGET_Freescale/TARGET_KL05Z/TOOLCHAIN_GCC_ARM/startup_MKL05Z4.s

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ __isr_vector:
130130
.long PORTB_IRQHandler /* Port B interrupt */
131131

132132
.size __isr_vector, . - __isr_vector
133+
.org 0x400, 0xff
134+
135+
.long 0xffffffff
136+
.long 0xffffffff
137+
.long 0xffffffff
138+
.long 0xfffffffe
133139

134140
.section .text.Reset_Handler
135141
.thumb
@@ -216,15 +222,4 @@ Reset_Handler:
216222
.weak DEF_IRQHandler
217223
.set DEF_IRQHandler, Default_Handler
218224

219-
/* Flash protection region, placed at 0x400 */
220-
.text
221-
.thumb
222-
.align 2
223-
.section .kinetis_flash_config_field,"a",%progbits
224-
kinetis_flash_config:
225-
.long 0xffffffff
226-
.long 0xffffffff
227-
.long 0xffffffff
228-
.long 0xfffffffe
229-
230225
.end

0 commit comments

Comments
 (0)