Skip to content

Commit b75dada

Browse files
committed
Merge pull request #779 from ndelisi/master
Y5Design LPC11U35 and NRF51822 - Add New targets
2 parents c155dea + a03d3bc commit b75dada

File tree

6 files changed

+573
-0
lines changed
  • libraries/mbed/targets
    • cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/TARGET_LPC11U35_Y5_MBUG
    • hal
  • workspace_tools

6 files changed

+573
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
/* Linker script to configure memory regions. */
2+
MEMORY
3+
{
4+
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 64K
5+
RAM (rwx) : ORIGIN = 0x100000C0, LENGTH = 0x1F40
6+
USB_RAM (rwx): ORIGIN = 0x20004000, LENGTH = 0x800
7+
}
8+
9+
/* Linker script to place sections and symbol values. Should be used together
10+
* with other linker script that defines memory regions FLASH and RAM.
11+
* It references following symbols, which must be defined in code:
12+
* Reset_Handler : Entry of reset handler
13+
*
14+
* It defines following symbols, which code can use without definition:
15+
* __exidx_start
16+
* __exidx_end
17+
* __etext
18+
* __data_start__
19+
* __preinit_array_start
20+
* __preinit_array_end
21+
* __init_array_start
22+
* __init_array_end
23+
* __fini_array_start
24+
* __fini_array_end
25+
* __data_end__
26+
* __bss_start__
27+
* __bss_end__
28+
* __end__
29+
* end
30+
* __HeapLimit
31+
* __StackLimit
32+
* __StackTop
33+
* __stack
34+
*/
35+
ENTRY(Reset_Handler)
36+
37+
SECTIONS
38+
{
39+
.text :
40+
{
41+
KEEP(*(.isr_vector))
42+
*(.text.Reset_Handler)
43+
44+
/* Only vectors and code running at reset are safe to be in first 512
45+
bytes since RAM can be mapped into this area for RAM based interrupt
46+
vectors. */
47+
. = 0x00000200;
48+
*(.text*)
49+
50+
KEEP(*(.init))
51+
KEEP(*(.fini))
52+
53+
/* .ctors */
54+
*crtbegin.o(.ctors)
55+
*crtbegin?.o(.ctors)
56+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
57+
*(SORT(.ctors.*))
58+
*(.ctors)
59+
60+
/* .dtors */
61+
*crtbegin.o(.dtors)
62+
*crtbegin?.o(.dtors)
63+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
64+
*(SORT(.dtors.*))
65+
*(.dtors)
66+
67+
*(.rodata*)
68+
69+
KEEP(*(.eh_frame*))
70+
} > FLASH
71+
72+
.ARM.extab :
73+
{
74+
*(.ARM.extab* .gnu.linkonce.armextab.*)
75+
} > FLASH
76+
77+
__exidx_start = .;
78+
.ARM.exidx :
79+
{
80+
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
81+
} > FLASH
82+
__exidx_end = .;
83+
84+
__etext = .;
85+
86+
.data : AT (__etext)
87+
{
88+
__data_start__ = .;
89+
*(vtable)
90+
*(.data*)
91+
92+
. = ALIGN(4);
93+
/* preinit data */
94+
PROVIDE (__preinit_array_start = .);
95+
KEEP(*(.preinit_array))
96+
PROVIDE (__preinit_array_end = .);
97+
98+
. = ALIGN(4);
99+
/* init data */
100+
PROVIDE (__init_array_start = .);
101+
KEEP(*(SORT(.init_array.*)))
102+
KEEP(*(.init_array))
103+
PROVIDE (__init_array_end = .);
104+
105+
106+
. = ALIGN(4);
107+
/* finit data */
108+
PROVIDE (__fini_array_start = .);
109+
KEEP(*(SORT(.fini_array.*)))
110+
KEEP(*(.fini_array))
111+
PROVIDE (__fini_array_end = .);
112+
113+
. = ALIGN(4);
114+
/* All data end */
115+
__data_end__ = .;
116+
117+
} > RAM
118+
119+
.bss :
120+
{
121+
__bss_start__ = .;
122+
*(.bss*)
123+
*(COMMON)
124+
__bss_end__ = .;
125+
} > RAM
126+
127+
.heap :
128+
{
129+
__end__ = .;
130+
end = __end__;
131+
*(.heap*)
132+
__HeapLimit = .;
133+
} > RAM
134+
135+
/* .stack_dummy section doesn't contains any symbols. It is only
136+
* used for linker to calculate size of stack sections, and assign
137+
* values to stack symbols later */
138+
.stack_dummy :
139+
{
140+
*(.stack)
141+
} > RAM
142+
143+
/* Set stack top to end of RAM, and stack limit move down by
144+
* size of stack_dummy section */
145+
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
146+
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
147+
PROVIDE(__stack = __StackTop);
148+
149+
/* Check if data + heap + stack exceeds RAM limit */
150+
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
151+
}
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2013 Nordic Semiconductor
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 3
31+
32+
typedef enum {
33+
p0 = 0,
34+
p1 = 1,
35+
p2 = 2,
36+
p3 = 3,
37+
p4 = 4,
38+
p5 = 5,
39+
p6 = 6,
40+
p7 = 7,
41+
p8 = 8,
42+
p9 = 9,
43+
p10 = 10,
44+
p11 = 11,
45+
p12 = 12,
46+
p13 = 13,
47+
p14 = 14,
48+
p15 = 15,
49+
p16 = 16,
50+
p17 = 17,
51+
p18 = 18,
52+
p19 = 19,
53+
p20 = 20,
54+
p21 = 21,
55+
p22 = 22,
56+
p23 = 23,
57+
p24 = 24,
58+
p25 = 25,
59+
p26 = 26,
60+
p27 = 27,
61+
p28 = 28,
62+
p29 = 29,
63+
p30 = 30,
64+
p31 = 31,
65+
p32 = 32,
66+
p33 = 33,
67+
p34 = 34,
68+
p35 = 35,
69+
// p31=31,
70+
71+
// Not connected
72+
NC = (int)0xFFFFFFFF,
73+
74+
75+
P0_0 = p0,
76+
P0_1 = p1,
77+
P0_2 = p2,
78+
P0_3 = p3,
79+
P0_4 = p4,
80+
P0_5 = p5,
81+
P0_6 = p6,
82+
P0_7 = p7,
83+
84+
P0_8 = p8,
85+
P0_9 = p9,
86+
P0_10 = p10,
87+
P0_11 = p11,
88+
P0_12 = p12,
89+
P0_13 = p13,
90+
P0_14 = p14,
91+
P0_15 = p15,
92+
93+
P0_16 = p16,
94+
P0_17 = p17,
95+
P0_18 = p18,
96+
P0_19 = p19,
97+
P0_20 = p20,
98+
P0_21 = p21,
99+
P0_22 = p22,
100+
P0_23 = p23,
101+
102+
P0_24 = p24,
103+
P0_25 = p25,
104+
P0_26 = p26,
105+
P0_27 = p27,
106+
P0_28 = p28,
107+
P0_29 = p29,
108+
P0_30 = p30,
109+
110+
LED = p30,
111+
LED1 = p30,
112+
LED2 = p0,
113+
LED3 = p8,
114+
LED4 = NC,
115+
116+
BUTTON1 = p29,
117+
BUTTON2 = p17,
118+
119+
120+
RX_PIN_NUMBER = p2,
121+
TX_PIN_NUMBER = p3,
122+
CTS_PIN_NUMBER = p11,
123+
RTS_PIN_NUMBER = p21,
124+
125+
// mBed interface Pins
126+
USBTX = TX_PIN_NUMBER,
127+
USBRX = RX_PIN_NUMBER,
128+
129+
SPIS_PSELMOSI = p12,
130+
SPIS_PSELMISO = p6,
131+
SPIS_PSELSCK = p9,
132+
133+
I2C_SDA0 = p17,
134+
I2C_SCL0 = p18,
135+
136+
137+
} PinName;
138+
139+
typedef enum {
140+
PullNone = 0,
141+
PullDown = 1,
142+
PullUp = 3,
143+
PullDefault = PullUp
144+
} PinMode;
145+
146+
#ifdef __cplusplus
147+
}
148+
#endif
149+
150+
#endif
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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 0
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+
47+
#define DEVICE_SLEEP 1
48+
49+
#define DEVICE_DEBUG_AWARENESS 0
50+
51+
#define DEVICE_STDIO_MESSAGES 0
52+
53+
#define DEVICE_ERROR_PATTERN 1
54+
55+
#include "objects.h"
56+
57+
#endif

0 commit comments

Comments
 (0)