Skip to content

Commit afab75f

Browse files
committed
only one flash memory (FLASH)
1 parent 33c096c commit afab75f

File tree

3 files changed

+65
-67
lines changed

3 files changed

+65
-67
lines changed

libraries/mbed/targets/cmsis/TARGET_Freescale/TARGET_KL25Z/TOOLCHAIN_GCC_ARM/MKL25Z4.ld

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
/*
2+
* KL25Z ARM GCC linker script file
3+
*/
4+
15
MEMORY
26
{
3-
VECTORS (rx) : ORIGIN = 0x00000000, LENGTH = 0x000003FE
4-
FLASHCFG (rx) : ORIGIN = 0x00000400, LENGTH = 0x00000010
5-
FLASH (rx) : ORIGIN = 0x00000410, LENGTH = 128K - 0x410
7+
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 128K
68
RAM (rwx) : ORIGIN = 0x1FFFF000, LENGTH = 16K
79
}
810

@@ -41,15 +43,9 @@ SECTIONS
4143
__vector_table = .;
4244
. = ALIGN(4);
4345
KEEP(*(.isr_vector))
44-
*(.text.SystemInit)
45-
. = ALIGN(4);
46-
} > VECTORS
47-
48-
.cfmprotect :
49-
{
46+
*(.text.SystemInit)
5047
. = ALIGN(4);
51-
KEEP(*(.cfmprotect))
52-
} > FLASHCFG
48+
} > FLASH
5349

5450
.text :
5551
{

libraries/mbed/targets/cmsis/TARGET_Freescale/TARGET_KL25Z/TOOLCHAIN_GCC_ARM/startup_MKL25Z4.s

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* File: startup_ARMCM0.S
1+
/* KL25Z startup ARM GCC
22
* Purpose: startup file for Cortex-M0 devices. Should use with
33
* GCC for ARM Embedded Processors
44
* Version: V1.2
@@ -131,15 +131,6 @@ __isr_vector:
131131

132132
.size __isr_vector, . - __isr_vector
133133

134-
.section .cfmprotect
135-
.align 2
136-
.globl kinetis_flash_config
137-
kinetis_flash_config:
138-
.long 0xffffffff
139-
.long 0xffffffff
140-
.long 0xffffffff
141-
.long 0xffffffff
142-
143134
.section .text
144135
.thumb
145136
.thumb_func
@@ -232,4 +223,15 @@ Reset_Handler:
232223
.weak DEF_IRQHandler
233224
.set DEF_IRQHandler, Default_Handler
234225

226+
/* Flash protection region, placed inside isr_vector section */
227+
.section .isr_vector
228+
.align 2
229+
.org 0x400
230+
.globl kinetis_flash_config
231+
kinetis_flash_config:
232+
.long 0xffffffff
233+
.long 0xffffffff
234+
.long 0xffffffff
235+
.long 0xffffffff
236+
235237
.end

workspace_tools/targets.py

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,55 +11,55 @@ class Target:
1111
def __init__(self):
1212
# ARM Core
1313
self.core = None
14-
14+
1515
# Is the disk provided by the interface chip of this board virtual?
1616
self.is_disk_virtual = False
17-
17+
1818
# list of toolchains that are supported by the mbed SDK for this target
1919
self.supported_toolchains = None
20-
20+
2121
# list of extra specific labels
2222
self.extra_labels = []
23-
23+
2424
self.name = self.__class__.__name__
25-
25+
2626
def program_cycle_s(self):
2727
return 4 if self.is_disk_virtual else 1.5
28-
28+
2929
def get_labels(self):
3030
return [self.name, CORE_LABELS[self.core]] + self.extra_labels
3131

3232

3333
class LPC2368(Target):
3434
def __init__(self):
3535
Target.__init__(self)
36-
36+
3737
self.core = "ARM7TDMI-S"
38-
38+
3939
self.extra_labels = ['NXP', 'LPC23XX']
40-
40+
4141
self.supported_toolchains = ["ARM"]
4242

4343

4444
class LPC1768(Target):
4545
def __init__(self):
4646
Target.__init__(self)
47-
47+
4848
self.core = "Cortex-M3"
49-
49+
5050
self.extra_labels = ['NXP', 'LPC176X']
51-
51+
5252
self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CS", "GCC_CR", "IAR"]
5353

5454

5555
class LPC11U24(Target):
5656
def __init__(self):
5757
Target.__init__(self)
58-
58+
5959
self.core = "Cortex-M0"
60-
60+
6161
self.extra_labels = ['NXP', 'LPC11UXX']
62-
62+
6363
self.supported_toolchains = ["ARM", "uARM"]
6464

6565

@@ -68,7 +68,7 @@ def __init__(self):
6868
Target.__init__(self)
6969

7070
self.core = "Cortex-M0+"
71-
71+
7272
self.extra_labels = ['Freescale']
7373

7474
self.supported_toolchains = ["ARM"]
@@ -79,100 +79,100 @@ def __init__(self):
7979
class KL25Z(Target):
8080
def __init__(self):
8181
Target.__init__(self)
82-
82+
8383
self.core = "Cortex-M0+"
84-
84+
8585
self.extra_labels = ['Freescale']
86-
87-
self.supported_toolchains = ["ARM", "GCC_CW_EWL", "GCC_CW_NEWLIB"]
88-
86+
87+
self.supported_toolchains = ["ARM", "GCC_CW_EWL", "GCC_CW_NEWLIB", "GCC_ARM"]
88+
8989
self.is_disk_virtual = True
9090

9191

9292
class LPC812(Target):
9393
def __init__(self):
9494
Target.__init__(self)
95-
95+
9696
self.core = "Cortex-M0+"
97-
97+
9898
self.extra_labels = ['NXP', 'LPC81X']
99-
99+
100100
self.supported_toolchains = ["uARM"]
101-
101+
102102
self.is_disk_virtual = True
103103

104104

105105
class LPC4088(Target):
106106
def __init__(self):
107107
Target.__init__(self)
108-
108+
109109
self.core = "Cortex-M4"
110-
110+
111111
self.extra_labels = ['NXP', 'LPC408X']
112-
112+
113113
self.supported_toolchains = ["ARM", "GCC_CR"]
114114

115115

116116
class LPC4330_M4(Target):
117117
def __init__(self):
118118
Target.__init__(self)
119-
119+
120120
self.core = "Cortex-M4"
121-
121+
122122
self.extra_labels = ['NXP', 'LPC43XX']
123-
123+
124124
self.supported_toolchains = ["ARM", "GCC_CR", "IAR"]
125125

126126

127127
class LPC4330_M0(Target):
128128
def __init__(self):
129129
Target.__init__(self)
130-
130+
131131
self.core = "Cortex-M0"
132-
132+
133133
self.extra_labels = ['NXP', 'LPC43XX']
134-
134+
135135
self.supported_toolchains = ["ARM", "GCC_CR", "IAR"]
136136

137137
class LPC1800(Target):
138138
def __init__(self):
139139
Target.__init__(self)
140-
140+
141141
self.core = "Cortex-M3"
142-
142+
143143
self.extra_labels = ['NXP', 'LPC43XX']
144-
144+
145145
self.supported_toolchains = ["ARM", "GCC_CR", "IAR"]
146146

147147
class STM32F407(Target):
148148
def __init__(self):
149149
Target.__init__(self)
150-
150+
151151
self.core = "Cortex-M4"
152-
152+
153153
self.extra_labels = ['STM', 'STM32F4XX']
154-
154+
155155
self.supported_toolchains = ["ARM", "GCC_ARM"]
156156

157157

158158
class MBED_MCU(Target):
159159
def __init__(self):
160160
Target.__init__(self)
161-
161+
162162
self.core = "Cortex-M0+"
163-
163+
164164
self.extra_labels = ['ARM']
165-
165+
166166
self.supported_toolchains = ["ARM"]
167167

168168
class LPC1347(Target):
169169
def __init__(self):
170170
Target.__init__(self)
171-
171+
172172
self.core = "Cortex-M3"
173-
173+
174174
self.extra_labels = ['NXP', 'LPC13XX']
175-
175+
176176
self.supported_toolchains = ["ARM", "GCC_ARM"]
177177

178178
# Get a single instance for each target

0 commit comments

Comments
 (0)