Skip to content

Commit f382af4

Browse files
committed
Porting of new target: Added new target to target.py, added header files for PinNames.h and device.h. Added linker library.
Y5 Design LLC Interface Board LPC11u35 from NXP Low Power, ARM(r) Cortex-M0 suitable for a wide range of applications On-Chip Bootloader - In-System programming (ISP) and in-application programming (IAP) ROM-based USB drivers - Flash updates via USB supported SPI, GPIO, i2C, UART, ADC 3x LEDs, Reset Button 3.3V powered via USB or external USB interface - shipped with USB-A, male connector, pads for Micro female
1 parent 3fb8590 commit f382af4

File tree

4 files changed

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

4 files changed

+359
-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+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2006-2014 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+
// Not connected
97+
NC = (int)0xFFFFFFFF,
98+
99+
// Other mbed Pin Names
100+
LED1 = P0_20, //Approved
101+
LED2 = P0_9, //Approved
102+
LED3 = P0_11, //Approved
103+
LED4 = NC,
104+
105+
UART_TX = P0_19,
106+
UART_RX = P0_18,
107+
108+
109+
110+
// Standard but not supported pins
111+
USBTX = NC,
112+
USBRX = NC
113+
114+
} PinName;
115+
116+
typedef enum {
117+
CHANNEL0 = FLEX_INT0_IRQn,
118+
CHANNEL1 = FLEX_INT1_IRQn,
119+
CHANNEL2 = FLEX_INT2_IRQn,
120+
CHANNEL3 = FLEX_INT3_IRQn,
121+
CHANNEL4 = FLEX_INT4_IRQn,
122+
CHANNEL5 = FLEX_INT5_IRQn,
123+
CHANNEL6 = FLEX_INT6_IRQn,
124+
CHANNEL7 = FLEX_INT7_IRQn
125+
} Channel;
126+
127+
typedef enum {
128+
PullUp = 2,
129+
PullDown = 1,
130+
PullNone = 0,
131+
Repeater = 3,
132+
OpenDrain = 4,
133+
PullDefault = PullDown
134+
} PinMode;
135+
136+
#ifdef __cplusplus
137+
}
138+
#endif
139+
140+
#endif
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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ def __init__(self):
136136
self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CR" , "IAR"]
137137
self.default_toolchain = "uARM"
138138

139+
class LPC11U35_Y5_MBUG(LPCTarget):
140+
def __init__(self):
141+
LPCTarget.__init__(self)
142+
self.core = "Cortex-M0"
143+
self.extra_labels = ['NXP', 'LPC11UXX', 'MCU_LPC11U35_501']
144+
self.supported_toolchains = ["ARM", "uARM", "GCC_ARM", "GCC_CR" , "IAR"]
145+
self.default_toolchain = "uARM"
146+
139147
class LPC11U37_501(LPCTarget):
140148
def __init__(self):
141149
LPCTarget.__init__(self)
@@ -794,6 +802,7 @@ def program_cycle_s(self):
794802
LPC11U24_301(),
795803
LPC11U35_401(),
796804
LPC11U35_501(),
805+
LPC11U35_Y5_MBUG(),
797806
LPC11U37_501(),
798807
LPCCAPPUCCINO(),# LPC11U37_501
799808
ARCH_GPRS(), # LPC11U37_501

0 commit comments

Comments
 (0)