Skip to content

Commit 0b7b758

Browse files
committed
fixed L6235E link error for Xadow M0
1 parent 4c54ea6 commit 0b7b758

File tree

9 files changed

+252
-7
lines changed

9 files changed

+252
-7
lines changed
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2006-2013 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
#ifndef MBED_PINNAMES_H
17+
#define MBED_PINNAMES_H
18+
19+
#include "cmsis.h"
20+
21+
#ifdef __cplusplus
22+
extern "C" {
23+
#endif
24+
25+
typedef enum {
26+
PIN_INPUT,
27+
PIN_OUTPUT
28+
} PinDirection;
29+
30+
#define PORT_SHIFT 5
31+
32+
typedef enum {
33+
// LPC11U Pin Names
34+
P0_0 = 0,
35+
P0_1 = 1,
36+
P0_2 = 2,
37+
P0_3 = 3,
38+
P0_4 = 4,
39+
P0_5 = 5,
40+
P0_6 = 6,
41+
P0_7 = 7,
42+
P0_8 = 8,
43+
P0_9 = 9,
44+
P0_10 = 10,
45+
P0_11 = 11,
46+
P0_12 = 12,
47+
P0_13 = 13,
48+
P0_14 = 14,
49+
P0_15 = 15,
50+
P0_16 = 16,
51+
P0_17 = 17,
52+
P0_18 = 18,
53+
P0_19 = 19,
54+
P0_20 = 20,
55+
P0_21 = 21,
56+
P0_22 = 22,
57+
P0_23 = 23,
58+
P0_24 = 24,
59+
P0_25 = 25,
60+
P0_26 = 26,
61+
P0_27 = 27,
62+
63+
P1_0 = 32,
64+
P1_1 = 33,
65+
P1_2 = 34,
66+
P1_3 = 35,
67+
P1_4 = 36,
68+
P1_5 = 37,
69+
P1_6 = 38,
70+
P1_7 = 39,
71+
P1_8 = 40,
72+
P1_9 = 41,
73+
P1_10 = 42,
74+
P1_11 = 43,
75+
P1_12 = 44,
76+
P1_13 = 45,
77+
P1_14 = 46,
78+
P1_15 = 47,
79+
P1_16 = 48,
80+
P1_17 = 49,
81+
P1_18 = 50,
82+
P1_19 = 51,
83+
P1_20 = 52,
84+
P1_21 = 53,
85+
P1_22 = 54,
86+
P1_23 = 55,
87+
P1_24 = 56,
88+
P1_25 = 57,
89+
P1_26 = 58,
90+
P1_27 = 59,
91+
P1_28 = 60,
92+
P1_29 = 61,
93+
94+
P1_31 = 63,
95+
96+
// mbed DIP Pin Names
97+
// CN1-1 (GND)
98+
// CN1-2 (EXTPOWER)
99+
// CN1-3 (NC)
100+
p4 = P0_0, // CN1-4
101+
p5 = P0_9, // CN1-5
102+
p6 = P0_8, // CN1-6
103+
p7 = P0_10, // CN1-7
104+
p8 = P0_7, // CN1-8
105+
p9 = P0_19, // CN1-9
106+
p10 = P0_18, // CN1-10
107+
p11 = P0_21, // CN1-11
108+
p12 = P0_22, // CN1-12
109+
p13 = P1_15, // CN1-13
110+
p14 = P0_6, // CN1-14
111+
p15 = P0_11, // CN1-15
112+
p16 = P0_12, // CN1-16
113+
p17 = P0_13, // CN1-17
114+
p18 = P0_14, // CN1-18
115+
p19 = P0_15, // CN1-19
116+
p20 = P0_16, // CN1-20
117+
118+
p21 = P0_14, // CN2-20
119+
p22 = P0_2, // CN2-19
120+
p23 = P0_23, // CN2-18
121+
p24 = P0_17, // CN2-17
122+
p25 = P0_20, // CN2-16
123+
p26 = P1_15, // CN2-15
124+
p27 = P0_4, // CN2-14
125+
p28 = P0_5, // CN2-13
126+
p29 = P1_19, // CN2-12
127+
p30 = P0_1, // CN2-11
128+
// CN2-10 (D+USB)
129+
// CN2-9 (D-USB)
130+
p33 = P0_3, // CN2-8 (USB-VBUS)
131+
// CN2-7 (NC)
132+
// CN2-6 (NC)
133+
// CN2-5 (NC)
134+
// CN2-4 (NC)
135+
// CN2-3 (NC)
136+
// CN2-2 (VDD)
137+
// CN2-1 (VDD)
138+
139+
// Other mbed Pin Names
140+
LED1 = P0_20,
141+
LED2 = P0_23,
142+
LED3 = P0_20,
143+
LED4 = P0_23,
144+
145+
UART_TX = P0_19,
146+
UART_RX = P0_18,
147+
148+
I2C_SCL = P0_4,
149+
I2C_SDA = P0_5,
150+
151+
// Not connected
152+
NC = (int)0xFFFFFFFF,
153+
} PinName;
154+
155+
typedef enum {
156+
CHANNEL0 = FLEX_INT0_IRQn,
157+
CHANNEL1 = FLEX_INT1_IRQn,
158+
CHANNEL2 = FLEX_INT2_IRQn,
159+
CHANNEL3 = FLEX_INT3_IRQn,
160+
CHANNEL4 = FLEX_INT4_IRQn,
161+
CHANNEL5 = FLEX_INT5_IRQn,
162+
CHANNEL6 = FLEX_INT6_IRQn,
163+
CHANNEL7 = FLEX_INT7_IRQn
164+
} Channel;
165+
166+
typedef enum {
167+
PullUp = 2,
168+
PullDown = 1,
169+
PullNone = 0,
170+
Repeater = 3,
171+
OpenDrain = 4,
172+
PullDefault = PullDown
173+
} PinMode;
174+
175+
#ifdef __cplusplus
176+
}
177+
#endif
178+
179+
#endif
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2006-2013 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
#ifndef MBED_DEVICE_H
17+
#define MBED_DEVICE_H
18+
19+
#define DEVICE_PORTIN 1
20+
#define DEVICE_PORTOUT 1
21+
#define DEVICE_PORTINOUT 1
22+
23+
#define DEVICE_INTERRUPTIN 1
24+
25+
#define DEVICE_ANALOGIN 1
26+
#define DEVICE_ANALOGOUT 0
27+
28+
#define DEVICE_SERIAL 1
29+
30+
#define DEVICE_I2C 1
31+
#define DEVICE_I2CSLAVE 1
32+
33+
#define DEVICE_SPI 1
34+
#define DEVICE_SPISLAVE 1
35+
36+
#define DEVICE_CAN 0
37+
38+
#define DEVICE_RTC 0
39+
40+
#define DEVICE_ETHERNET 0
41+
42+
#define DEVICE_PWMOUT 1
43+
44+
#define DEVICE_SEMIHOST 0
45+
#define DEVICE_LOCALFILESYSTEM 0
46+
#define DEVICE_ID_LENGTH 32
47+
#define DEVICE_MAC_OFFSET 20
48+
49+
#define DEVICE_SLEEP 1
50+
51+
#define DEVICE_DEBUG_AWARENESS 0
52+
53+
#define DEVICE_STDIO_MESSAGES 0
54+
55+
#define DEVICE_ERROR_PATTERN 1
56+
57+
#include "objects.h"
58+
59+
#endif

workspace_tools/targets.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ class LPC11U35_501(Target):
376376
def __init__(self):
377377
Target.__init__(self)
378378
self.core = "Cortex-M0"
379-
self.extra_labels = ['NXP', 'LPC11UXX']
379+
self.extra_labels = ['NXP', 'LPC11UXX', 'MCU_LPC11U35_501']
380380
self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CR"]
381381
self.default_toolchain = "uARM"
382382

@@ -512,18 +512,20 @@ def __init__(self):
512512
self.default_toolchain = "uARM"
513513

514514

515-
class XADOW_M0(LPC11U35_501):
515+
class XADOW_M0(Target):
516516
def __init__(self):
517-
LPC11U35_501.__init__(self)
518-
self.extra_labels = ['NXP', 'LPC11UXX', 'LPC11U35_501']
519-
self.macros = ['TARGET_LPC11U35_501']
517+
Target.__init__(self)
518+
self.core = "Cortex-M0"
519+
self.extra_labels = ['NXP', 'LPC11UXX', 'MCU_LPC11U35_501']
520+
self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CR"]
520521

521522

522523
class ARCH_BLE(NRF51822):
523524
def __init__(self):
524525
NRF51822.__init__(self)
525526
self.extra_labels = ['NORDIC', 'MCU_NRF51822']
526527
self.macros = ['TARGET_NRF51822']
528+
self.supported_form_factors = ["ARDUINO"]
527529

528530

529531
class ARCH_PRO(Target):
@@ -536,9 +538,14 @@ def __init__(self):
536538
self.supported_form_factors = ["ARDUINO"]
537539

538540

539-
class ARCH_GPRS(LPC11U37_501):
541+
class ARCH_GPRS(Target):
540542
def __init__(self):
541-
LPC11U37_501.__init__(self)
543+
Target.__init__(self)
544+
self.core = "Cortex-M0"
545+
self.extra_labels = ['NXP', 'LPC11UXX', 'LPC11U37_501']
546+
self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CR"]
547+
self.default_toolchain = "uARM"
548+
self.supported_form_factors = ["ARDUINO"]
542549

543550

544551
class LPCCAPPUCCINO(LPC11U37_501):

0 commit comments

Comments
 (0)