Skip to content

Commit 4e80813

Browse files
committed
Add u-blox Sara-N target.
1 parent 7bcc63b commit 4e80813

33 files changed

+4184
-0
lines changed

TESTS/mbedmicro-rtos-mbed/threads/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#define STACK_SIZE 512
2626
#elif defined(TARGET_XDOT_L151CC)
2727
#define STACK_SIZE 1024
28+
#elif defined(TARGET_HI2110)
29+
#define STACK_SIZE 512
2830
#else
2931
#define STACK_SIZE DEFAULT_STACK_SIZE
3032
#endif
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2016 u-blox
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+
17+
#ifndef MBED_PERIPHERALNAMES_H
18+
#define MBED_PERIPHERALNAMES_H
19+
20+
#include "cmsis.h"
21+
22+
#ifdef __cplusplus
23+
extern "C" {
24+
#endif
25+
26+
#define STDIO_UART_TX UART0_TX
27+
#define STDIO_UART_RX UART0_RX
28+
29+
typedef enum {
30+
SERIAL_CONFIG_UARTLP_RX_UART0_TX,
31+
SERIAL_CONFIG_UART0_RX_UART0_TX,
32+
SERIAL_CONFIG_UART1_RX_UART1_TX,
33+
MAX_NUM_SERIAL_CONFIGS
34+
} SerialConfig;
35+
36+
typedef enum {
37+
PIN_FUNCTION_UNCLAIMED = 0,
38+
PIN_FUNCTION_GPIO = 1,
39+
PIN_FUNCTION_PWM0 = 2,
40+
PIN_FUNCTION_PWM0B = 3,
41+
PIN_FUNCTION_PWM1 = 4,
42+
PIN_FUNCTION_PWM1B = 5,
43+
PIN_FUNCTION_SSP0TXD = 6,
44+
PIN_FUNCTION_SSP0RXD = 7,
45+
PIN_FUNCTION_SSP0TRX = 8,
46+
PIN_FUNCTION_SSP0CLK = 9,
47+
PIN_FUNCTION_SSP0FSS = 10,
48+
PIN_FUNCTION_SSP1CLK = 11,
49+
PIN_FUNCTION_SSP1FSS = 12,
50+
PIN_FUNCTION_SSP1TXD = 13,
51+
PIN_FUNCTION_SSP1RXD = 14,
52+
PIN_FUNCTION_SSP1TRX = 15,
53+
PIN_FUNCTION_I2C0 = 16,
54+
PIN_FUNCTION_I2C1 = 17,
55+
PIN_FUNCTION_UART0_TXD = 18,
56+
PIN_FUNCTION_UART0_TXIR = 19,
57+
PIN_FUNCTION_UART0_O2 = 20,
58+
PIN_FUNCTION_UART0_O1 = 21,
59+
PIN_FUNCTION_UART0_RTS = 22,
60+
PIN_FUNCTION_UART0_DTR = 23,
61+
PIN_FUNCTION_UART0_RXD = 24,
62+
PIN_FUNCTION_UART0_RXIR = 25,
63+
PIN_FUNCTION_UART0_CTS = 26,
64+
PIN_FUNCTION_UART0_DCD = 27,
65+
PIN_FUNCTION_UART0_DSR = 28,
66+
PIN_FUNCTION_UART0_RI = 29,
67+
PIN_FUNCTION_UART1_TXD = 30,
68+
PIN_FUNCTION_UART1_TXIR = 31,
69+
PIN_FUNCTION_UART1_O2 = 32,
70+
PIN_FUNCTION_UART1_O1 = 33,
71+
PIN_FUNCTION_UART1_RTS = 34,
72+
PIN_FUNCTION_UART1_DTR = 35,
73+
PIN_FUNCTION_UART1_RXD = 36,
74+
PIN_FUNCTION_UART1_RXIR = 37,
75+
PIN_FUNCTION_UART1_CTS = 38,
76+
PIN_FUNCTION_UART1_DCD = 39,
77+
PIN_FUNCTION_UART1_DSR = 40,
78+
PIN_FUNCTION_UART1_RI = 41,
79+
PIN_FUNCTION_LP_UART = 42,
80+
PIN_FUNCTION_MAX_NUMBER
81+
} PinFunction;
82+
83+
#ifdef __cplusplus
84+
}
85+
#endif
86+
87+
#endif
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2016 u-blox
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_PORTNAMES_H
17+
#define MBED_PORTNAMES_H
18+
19+
#ifdef __cplusplus
20+
extern "C" {
21+
#endif
22+
23+
typedef enum {
24+
Port0 = 0, //GPIO pins 0-19
25+
PortMaxNumber
26+
} PortName;
27+
28+
#ifdef __cplusplus
29+
}
30+
#endif
31+
#endif
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2006-2015 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_PINNAMES_H
18+
#define MBED_PINNAMES_H
19+
20+
#include "cmsis.h"
21+
22+
#ifdef __cplusplus
23+
extern "C" {
24+
#endif
25+
26+
typedef enum {
27+
PIN_INPUT,
28+
PIN_OUTPUT
29+
} PinDirection;
30+
31+
typedef enum {
32+
p0 = 0,
33+
p1 = 1,
34+
p2 = 2,
35+
p3 = 3,
36+
p4 = 4,
37+
p5 = 5,
38+
p6 = 6,
39+
p7 = 7,
40+
p8 = 8,
41+
p9 = 9,
42+
p10 = 10,
43+
p11 = 11,
44+
p12 = 12,
45+
p13 = 13,
46+
p14 = 14,
47+
p15 = 15,
48+
p16 = 16,
49+
p17 = 17,
50+
p18 = 18,
51+
p19 = 19,
52+
53+
UART0_RX = p13,
54+
UART0_TX = p18,
55+
UART0_CTS = p12,
56+
UART0_RTS = p11,
57+
I2C_SCL = p0,
58+
I2C_SDA = p1,
59+
SPI_CS = p2,
60+
SPI_CLK = p3,
61+
SPI_MOSI = p4,
62+
SPI_MISO = p5,
63+
UART1_RX = p7,
64+
UART1_TX = p6,
65+
LED1 = p2,
66+
LED2 = p3,
67+
LED3 = p4,
68+
LED4 = p5,
69+
70+
// mBed interface Pins
71+
USBTX = UART0_TX,
72+
USBRX = UART0_RX,
73+
74+
P0_0 = p0,
75+
P0_1 = p1,
76+
P0_2 = p2,
77+
P0_3 = p3,
78+
P0_4 = p4,
79+
P0_5 = p5,
80+
P0_6 = p6,
81+
P0_7 = p7,
82+
P0_8 = p8,
83+
P0_9 = p9,
84+
P0_10 = p10,
85+
P0_11 = p11,
86+
P0_12 = p12,
87+
P0_13 = p13,
88+
P0_14 = p14,
89+
P0_15 = p15,
90+
P0_16 = p16,
91+
P0_17 = p17,
92+
P0_18 = p18,
93+
P0_19 = p19,
94+
NUM_PINS,
95+
96+
// Not connected
97+
NC = (int)0xFFFFFFFF
98+
} PinName;
99+
100+
typedef enum {
101+
PullNone = 0,
102+
PullDown = 1,
103+
PullUp = 0xff, /* TODO: current HI2110 chip does not have pull-up */
104+
PullDefault = PullDown /* TODO: mbed requires PullUp as default but HI2110 doesn't have it */
105+
} PinMode;
106+
107+
#ifdef __cplusplus
108+
}
109+
#endif
110+
111+
#endif // MBED_PINNAMES_H
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches.
2+
// Check the 'features' section of the target description in 'targets.json' for more details.
3+
/* mbed Microcontroller Library
4+
* Copyright (c) 2006-2013 ARM Limited
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
#ifndef MBED_DEVICE_H
19+
#define MBED_DEVICE_H
20+
21+
#include "objects.h"
22+
23+
#endif
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
LR_IROM1 0x00000000 0x20000 {
2+
ER_IROM1 0x00000000 0x20000 {
3+
*.o (RESET, +First)
4+
*(InRoot$$Sections)
5+
.ANY (+RO)
6+
}
7+
RW_IRAM_VTABLE 0x01000000 EMPTY 128 {
8+
}
9+
RW_IRAM1 +0 (0x5000 - 256) {
10+
.ANY (+RW +ZI)
11+
}
12+
RW_IPCRAM +0 256 {
13+
ipc.o (+RW)
14+
}
15+
}

0 commit comments

Comments
 (0)