26
26
import os
27
27
import shutil
28
28
29
+
29
30
class Target :
30
31
def __init__ (self ):
31
32
# ARM Core
@@ -51,6 +52,7 @@ def get_labels(self):
51
52
def init_hooks (self , hook , toolchain_name ):
52
53
pass
53
54
55
+
54
56
class LPC2368 (Target ):
55
57
def __init__ (self ):
56
58
Target .__init__ (self )
@@ -168,16 +170,11 @@ def __init__(self):
168
170
self .extra_labels = ['NXP' , 'LPC408X' ]
169
171
170
172
self .supported_toolchains = ["ARM" , "GCC_CR" , "GCC_ARM" ]
171
-
172
- # Use this target to generate the custom binary image for LPC4088 EA boards
173
- class LPC4088_EA (LPC4088 ):
174
- def __init__ (self ):
175
- LPC4088 .__init__ (self )
176
-
173
+
177
174
def init_hooks (self , hook , toolchain_name ):
178
175
if toolchain_name in ['ARM_STD' , 'ARM_MICRO' ]:
179
176
hook .hook_add_binary ("post" , self .binary_hook )
180
-
177
+
181
178
@staticmethod
182
179
def binary_hook (t_self , elf , binf ):
183
180
if not os .path .isdir (binf ):
@@ -206,6 +203,7 @@ def binary_hook(t_self, elf, binf):
206
203
os .rename (binf + '.temp' , binf )
207
204
t_self .debug ("Generated custom binary file (internal flash + SPIFI)" )
208
205
206
+
209
207
class LPC4330_M4 (Target ):
210
208
def __init__ (self ):
211
209
Target .__init__ (self )
@@ -293,26 +291,29 @@ def __init__(self):
293
291
294
292
self .supported_toolchains = ["ARM" , "uARM" , "GCC_ARM" ]
295
293
294
+
296
295
class LPC11U35_401 (Target ):
297
296
def __init__ (self ):
298
297
Target .__init__ (self )
299
-
298
+
300
299
self .core = "Cortex-M0"
301
-
300
+
302
301
self .extra_labels = ['NXP' , 'LPC11UXX' ]
303
-
302
+
304
303
self .supported_toolchains = ["ARM" , "uARM" , "GCC_ARM" ]
305
304
305
+
306
306
class nRF51822 (Target ):
307
307
def __init__ (self ):
308
308
Target .__init__ (self )
309
-
309
+
310
310
self .core = "Cortex-M0"
311
-
311
+
312
312
self .extra_labels = ["NORDIC" ]
313
-
313
+
314
314
self .supported_toolchains = ["ARM" ]
315
315
316
+
316
317
# Get a single instance for each target
317
318
TARGETS = [
318
319
LPC2368 (),
@@ -332,7 +333,6 @@ def __init__(self):
332
333
LPC1114 (),
333
334
LPC11C24 (),
334
335
LPC11U35_401 (),
335
- LPC4088_EA (),
336
336
nRF51822 ()
337
337
]
338
338
@@ -344,4 +344,4 @@ def __init__(self):
344
344
TARGET_NAMES = TARGET_MAP .keys ()
345
345
346
346
# Some targets with different name have the same exporters
347
- EXPORT_MAP = {"LPC4088_EA" : "LPC4088" }
347
+ EXPORT_MAP = {}
0 commit comments