Skip to content

Commit 512daf9

Browse files
committed
Add NICLA target
1 parent 2444478 commit 512daf9

File tree

5 files changed

+248
-1
lines changed

5 files changed

+248
-1
lines changed

storage/blockdevice/COMPONENT_SD/mbed_lib.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@
133133
"SPI_MOSI": "SPI_MOSI",
134134
"SPI_MISO": "SPI_MISO",
135135
"SPI_CLK": "SPI_SCK"
136-
}
136+
},
137+
"NICLA": {
138+
"SPI_MOSI": "P0_13",
139+
"SPI_MISO": "P0_14",
140+
"SPI_CLK": "P0_12",
141+
"SPI_CS": "P0_16"
142+
}
137143
}
138144
}

storage/blockdevice/COMPONENT_SPIF/mbed_lib.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@
6767
"SPI_MISO": "SPI3_MISO",
6868
"SPI_CLK": "SPI3_SCK",
6969
"SPI_CS": "SPI_CS1"
70+
},
71+
"NICLA": {
72+
"SPI_MOSI": "SPI_PSELMOSI0",
73+
"SPI_MISO": "SPI_PSELMISO0",
74+
"SPI_CLK": "SPI_PSELSCK0",
75+
"SPI_CS": "CS_FLASH"
7076
}
7177
}
7278
}
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
/*
2+
* Copyright (c) 2016 Nordic Semiconductor ASA
3+
* All rights reserved.
4+
*
5+
* Redistribution and use in source and binary forms, with or without modification,
6+
* are permitted provided that the following conditions are met:
7+
*
8+
* 1. Redistributions of source code must retain the above copyright notice, this list
9+
* of conditions and the following disclaimer.
10+
*
11+
* 2. Redistributions in binary form, except as embedded into a Nordic Semiconductor ASA
12+
* integrated circuit in a product or a software update for such product, must reproduce
13+
* the above copyright notice, this list of conditions and the following disclaimer in
14+
* the documentation and/or other materials provided with the distribution.
15+
*
16+
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its contributors may be
17+
* used to endorse or promote products derived from this software without specific prior
18+
* written permission.
19+
*
20+
* 4. This software, with or without modification, must only be used with a
21+
* Nordic Semiconductor ASA integrated circuit.
22+
*
23+
* 5. Any software provided in binary or object form under this license must not be reverse
24+
* engineered, decompiled, modified and/or disassembled.
25+
*
26+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
27+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
28+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
30+
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
31+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
33+
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36+
*
37+
*/
38+
39+
#ifndef MBED_PINNAMES_H
40+
#define MBED_PINNAMES_H
41+
42+
#include "cmsis.h"
43+
44+
#ifdef __cplusplus
45+
extern "C" {
46+
#endif
47+
48+
typedef enum {
49+
PIN_INPUT,
50+
PIN_OUTPUT
51+
} PinDirection;
52+
53+
typedef enum {
54+
p0 = 0,
55+
p1 = 1,
56+
p2 = 2,
57+
p3 = 3,
58+
p4 = 4,
59+
p5 = 5,
60+
p6 = 6,
61+
p7 = 7,
62+
p8 = 8,
63+
p9 = 9,
64+
p10 = 10,
65+
p11 = 11,
66+
p12 = 12,
67+
p13 = 13,
68+
p14 = 14,
69+
p15 = 15,
70+
p16 = 16,
71+
p17 = 17,
72+
p18 = 18,
73+
p19 = 19,
74+
p20 = 20,
75+
p21 = 21,
76+
p22 = 22,
77+
p23 = 23,
78+
p24 = 24,
79+
p25 = 25,
80+
p26 = 26,
81+
p27 = 27,
82+
p28 = 28,
83+
p29 = 29,
84+
p30 = 30,
85+
p31 = 31,
86+
87+
// Not connected
88+
NC = (int)0xFFFFFFFF,
89+
90+
P0_0 = p0,
91+
P0_1 = p1,
92+
P0_2 = p2,
93+
P0_3 = p3,
94+
P0_4 = p4,
95+
P0_5 = p5,
96+
P0_6 = p6,
97+
P0_7 = p7,
98+
99+
P0_8 = p8,
100+
P0_9 = p9,
101+
P0_10 = p10,
102+
P0_11 = p11,
103+
P0_12 = p12,
104+
P0_13 = p13,
105+
P0_14 = p14,
106+
P0_15 = p15,
107+
108+
P0_16 = p16,
109+
P0_17 = p17,
110+
P0_18 = p18,
111+
P0_19 = p19,
112+
P0_20 = p20,
113+
P0_21 = p21,
114+
P0_22 = p22,
115+
P0_23 = p23,
116+
117+
P0_24 = p24,
118+
P0_25 = p25,
119+
P0_26 = p26,
120+
P0_27 = p27,
121+
P0_28 = p28,
122+
P0_29 = p29,
123+
P0_30 = p30,
124+
P0_31 = p31,
125+
126+
LED1 = p11,
127+
LED2 = p11,
128+
LED3 = p11,
129+
LED4 = p11,
130+
131+
//INT_BQ = p18,
132+
INT_BHI260 = p14,
133+
BQ_CDN = p25,
134+
INT_ESLOV = p19,
135+
//BHI_HOSTBOOT = p25,
136+
RESET_BHI260 = p18,
137+
138+
BUTTON1 = p21,
139+
140+
GPIO0 = p24,
141+
GPIO1 = p20,
142+
GPIO2 = p9,
143+
GPIO3 = p10,
144+
145+
RX_PIN_NUMBER = p9,
146+
TX_PIN_NUMBER = p20,
147+
CTS_PIN_NUMBER = NC,
148+
RTS_PIN_NUMBER = NC,
149+
150+
CONSOLE_TX = TX_PIN_NUMBER,
151+
CONSOLE_RX = RX_PIN_NUMBER,
152+
153+
// mBed interface Pins
154+
STDIO_UART_TX = TX_PIN_NUMBER,
155+
STDIO_UART_RX = RX_PIN_NUMBER,
156+
STDIO_UART_CTS = CTS_PIN_NUMBER,
157+
STDIO_UART_RTS = RTS_PIN_NUMBER,
158+
159+
SPI_PSELSCK0 = p3,
160+
SPI_PSELMISO0 = p5,
161+
SPI_PSELMOSI0 = p4,
162+
SPI_PSELSS0 = p31,
163+
CS_FLASH = p26,
164+
165+
SPI_PSELSS1 = p29,
166+
SPI_PSELMISO1 = p28,
167+
SPI_PSELMOSI1 = p27,
168+
SPI_PSELSCK1 = p11,
169+
170+
I2C_SDA0 = p15,
171+
I2C_SCL0 = p16,
172+
173+
I2C_SDA1 = p22,
174+
I2C_SCL1 = p23,
175+
} PinName;
176+
177+
typedef enum {
178+
PullNone = 0,
179+
PullDown = 1,
180+
PullUp = 3,
181+
PullDefault = PullUp
182+
} PinMode;
183+
184+
#ifdef __cplusplus
185+
}
186+
#endif
187+
188+
#endif
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2006-2013 ARM Limited
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
#ifndef MBED_DEVICE_H
18+
#define MBED_DEVICE_H
19+
20+
#include "objects.h"
21+
22+
#endif

targets/targets.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6906,6 +6906,31 @@
69066906
],
69076907
"device_name": "nRF52832_xxAA"
69086908
},
6909+
"NICLA": {
6910+
"inherits": ["MCU_NRF52832"],
6911+
"components_add": [
6912+
"FLASHIAP"
6913+
],
6914+
"release_versions": ["5"],
6915+
"device_name": "nRF52832_xxAA",
6916+
"macros_add": [
6917+
"CONFIG_GPIO_AS_PINRESET",
6918+
"NRF52_PAN_12",
6919+
"NRF52_PAN_15",
6920+
"NRF52_PAN_20",
6921+
"NRF52_PAN_30",
6922+
"NRF52_PAN_31",
6923+
"NRF52_PAN_36",
6924+
"NRF52_PAN_51",
6925+
"NRF52_PAN_53",
6926+
"NRF52_PAN_54",
6927+
"NRF52_PAN_55",
6928+
"NRF52_PAN_58",
6929+
"NRF52_PAN_62",
6930+
"NRF52_PAN_63",
6931+
"NRF52_PAN_64"
6932+
]
6933+
},
69096934
"MCU_NRF52840": {
69106935
"inherits": [
69116936
"Target"

0 commit comments

Comments
 (0)