Skip to content

Commit 9702a13

Browse files
committed
Merge branch 'master' of https://github.com/mbedmicro/mbed
2 parents c84b8f9 + c560db3 commit 9702a13

File tree

20 files changed

+1549
-9
lines changed

20 files changed

+1549
-9
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ NXP:
3535
* LPC11C24 (Cortex-M0)
3636

3737
Freescale:
38-
* [KL25Z](http://mbed.org/platforms/KL25Z/) (Cortex-M0+)
3938
* KL05Z (Cortex-M0+)
39+
* [KL25Z](http://mbed.org/platforms/KL25Z/) (Cortex-M0+)
40+
* [KL46Z](https://mbed.org/platforms/FRDM-KL46Z/) (Cortex-M0+)
4041

4142
STMicroelectronics:
4243
* STM32F407 (Cortex-M4)

libraries/USBHost/USBHostSerial/USBHostSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ bool USBHostSerial::connect() {
8484

8585
/*virtual*/ bool USBHostSerial::parseInterface(uint8_t intf_nb, uint8_t intf_class, uint8_t intf_subclass, uint8_t intf_protocol) //Must return true if the interface should be parsed
8686
{
87-
if ((ports_found < USBHOST_MAXSERIAL) &&
87+
if (!ports_found &&
8888
CHECK_INTERFACE(intf_class, intf_subclass, intf_protocol)) {
8989
port_intf = intf_nb;
9090
ports_found = true;
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
/*
2+
* KL05Z ARM GCC linker script file, Martin Kojtal (0xc0170)
3+
*/
4+
5+
MEMORY
6+
{
7+
VECTORS (rx) : ORIGIN = 0x00000000, LENGTH = 0x00000410
8+
FLASH (rx) : ORIGIN = 0x00000410, LENGTH = 32K - 0x00000410
9+
RAM (rwx) : ORIGIN = 0x1FFFFC00, LENGTH = 4K - 0xC0
10+
}
11+
12+
/* Linker script to place sections and symbol values. Should be used together
13+
* with other linker script that defines memory regions FLASH and RAM.
14+
* It references following symbols, which must be defined in code:
15+
* _reset_init : Entry of reset handler
16+
*
17+
* It defines following symbols, which code can use without definition:
18+
* __exidx_start
19+
* __exidx_end
20+
* __etext
21+
* __data_start__
22+
* __preinit_array_start
23+
* __preinit_array_end
24+
* __init_array_start
25+
* __init_array_end
26+
* __fini_array_start
27+
* __fini_array_end
28+
* __data_end__
29+
* __bss_start__
30+
* __bss_end__
31+
* __end__
32+
* end
33+
* __HeapLimit
34+
* __StackLimit
35+
* __StackTop
36+
* __stack
37+
*/
38+
ENTRY(Reset_Handler)
39+
40+
SECTIONS
41+
{
42+
.isr_vector :
43+
{
44+
__vector_table = .;
45+
KEEP(*(.vector_table))
46+
. = ALIGN(4);
47+
} > VECTORS
48+
49+
.text :
50+
{
51+
*(.text*)
52+
53+
KEEP(*(.init))
54+
KEEP(*(.fini))
55+
56+
/* .ctors */
57+
*crtbegin.o(.ctors)
58+
*crtbegin?.o(.ctors)
59+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
60+
*(SORT(.ctors.*))
61+
*(.ctors)
62+
63+
/* .dtors */
64+
*crtbegin.o(.dtors)
65+
*crtbegin?.o(.dtors)
66+
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
67+
*(SORT(.dtors.*))
68+
*(.dtors)
69+
70+
*(.rodata*)
71+
72+
KEEP(*(.eh_frame*))
73+
} > FLASH
74+
75+
.ARM.extab :
76+
{
77+
*(.ARM.extab* .gnu.linkonce.armextab.*)
78+
} > FLASH
79+
80+
__exidx_start = .;
81+
.ARM.exidx :
82+
{
83+
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
84+
} > FLASH
85+
__exidx_end = .;
86+
87+
__etext = .;
88+
89+
.data : AT (__etext)
90+
{
91+
__data_start__ = .;
92+
*(vtable)
93+
*(.data*)
94+
95+
. = ALIGN(4);
96+
/* preinit data */
97+
PROVIDE_HIDDEN (__preinit_array_start = .);
98+
KEEP(*(.preinit_array))
99+
PROVIDE_HIDDEN (__preinit_array_end = .);
100+
101+
. = ALIGN(4);
102+
/* init data */
103+
PROVIDE_HIDDEN (__init_array_start = .);
104+
KEEP(*(SORT(.init_array.*)))
105+
KEEP(*(.init_array))
106+
PROVIDE_HIDDEN (__init_array_end = .);
107+
108+
109+
. = ALIGN(4);
110+
/* finit data */
111+
PROVIDE_HIDDEN (__fini_array_start = .);
112+
KEEP(*(SORT(.fini_array.*)))
113+
KEEP(*(.fini_array))
114+
PROVIDE_HIDDEN (__fini_array_end = .);
115+
116+
. = ALIGN(4);
117+
/* All data end */
118+
__data_end__ = .;
119+
120+
} > RAM
121+
122+
.bss :
123+
{
124+
__bss_start__ = .;
125+
*(.bss*)
126+
*(COMMON)
127+
__bss_end__ = .;
128+
} > RAM
129+
130+
.heap :
131+
{
132+
__end__ = .;
133+
end = __end__;
134+
*(.heap*)
135+
__HeapLimit = .;
136+
} > RAM
137+
138+
/* .stack_dummy section doesn't contains any symbols. It is only
139+
* used for linker to calculate size of stack sections, and assign
140+
* values to stack symbols later */
141+
.stack_dummy :
142+
{
143+
*(.stack)
144+
} > RAM
145+
146+
/* Set stack top to end of RAM, and stack limit move down by
147+
* size of stack_dummy section */
148+
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
149+
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
150+
PROVIDE(__stack = __StackTop);
151+
152+
/* Check if data + heap + stack exceeds RAM limit */
153+
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
154+
}

0 commit comments

Comments
 (0)