Skip to content

Commit 2c5aab7

Browse files
committed
Add base MCU support for Cortex-M4. Tidy up targets.py
1 parent 59b868a commit 2c5aab7

File tree

1 file changed

+44
-10
lines changed

1 file changed

+44
-10
lines changed

workspace_tools/targets.py

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,37 @@ def get_labels(self):
6969

7070
def init_hooks(self, hook, toolchain_name):
7171
pass
72-
##WIZnet
72+
73+
74+
### MCU Support ###
7375

74-
class WIZwiki_W7500(Target):
76+
class CM4_UARM(Target):
7577
def __init__(self):
7678
Target.__init__(self)
77-
self.core = "Cortex-M0"
78-
self.extra_labels = ['WIZNET', 'W7500x', 'WIZwiki_W7500']
79-
self.supported_toolchains = ["uARM", "ARM"]
79+
self.core = "Cortex-M4"
80+
self.supported_toolchains = ["uARM"]
81+
self.default_toolchain = "uARM"
82+
83+
class CM4_ARM(Target):
84+
def __init__(self):
85+
Target.__init__(self)
86+
self.core = "Cortex-M4"
87+
self.supported_toolchains = ["ARM"]
8088
self.default_toolchain = "ARM"
81-
self.supported_form_factors = ["ARDUINO"]
89+
90+
class CM4F_UARM(Target):
91+
def __init__(self):
92+
Target.__init__(self)
93+
self.core = "Cortex-M4F"
94+
self.supported_toolchains = ["uARM"]
95+
self.default_toolchain = "uARM"
8296

97+
class CM4F_ARM(Target):
98+
def __init__(self):
99+
Target.__init__(self)
100+
self.core = "Cortex-M4F"
101+
self.supported_toolchains = ["ARM"]
102+
self.default_toolchain = "ARM"
83103

84104

85105
### NXP ###
@@ -1250,19 +1270,29 @@ def __init__(self):
12501270
self.supported_toolchains = ["GCC_ARM", "uARM"]
12511271
self.default_toolchain = "uARM"
12521272

1273+
1274+
##WIZnet
1275+
1276+
class WIZwiki_W7500(Target):
1277+
def __init__(self):
1278+
Target.__init__(self)
1279+
self.core = "Cortex-M0"
1280+
self.extra_labels = ['WIZNET', 'W7500x', 'WIZwiki_W7500']
1281+
self.supported_toolchains = ["uARM", "ARM"]
1282+
self.default_toolchain = "ARM"
1283+
self.supported_form_factors = ["ARDUINO"]
1284+
1285+
12531286
# Get a single instance for each target
12541287
TARGETS = [
12551288

1256-
### WIZnet ###
1257-
WIZwiki_W7500(),
1258-
12591289
### NXP ###
12601290
LPC11C24(),
12611291
LPC11U24(),
12621292
OC_MBUINO(), # LPC11U24
12631293
LPC11U24_301(),
12641294
LPC11U34_421(),
1265-
APPNEARME_MICRONFCBOARD(), #LPC11U34_421
1295+
APPNEARME_MICRONFCBOARD(), # LPC11U34_421
12661296
LPC11U35_401(),
12671297
LPC11U35_501(),
12681298
XADOW_M0(), # LPC11U35_501
@@ -1377,6 +1407,10 @@ def __init__(self):
13771407
EFM32WG_STK3800(),
13781408
EFM32ZG_STK3200(),
13791409
EFM32HG_STK3400(),
1410+
1411+
### WIZnet ###
1412+
WIZwiki_W7500(),
1413+
13801414
]
13811415

13821416
# Map each target name to its unique instance

0 commit comments

Comments
 (0)