Skip to content

Commit 256f70f

Browse files
author
Bogdan Marinescu
committed
Merge remote-tracking branch 'origin/master'
2 parents 3c0a8b6 + 60f37b4 commit 256f70f

File tree

14 files changed

+653
-32
lines changed

14 files changed

+653
-32
lines changed

libraries/mbed/api/Ethernet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Ethernet {
8989
*
9090
* @returns
9191
* 0 if the sending was failed,
92-
* 1 if the package is successfully sent.
92+
* or the size of the packet successfully sent.
9393
*/
9494
int send();
9595

libraries/mbed/common/CAN.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ CAN::CAN(PinName rd, PinName td) {
2727
}
2828

2929
CAN::~CAN() {
30-
can_free(&_can);
3130
can_irq_free(&_can);
31+
can_free(&_can);
3232
}
3333

3434
int CAN::frequency(int f) {
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
/* Linker script for mbed LPC4330 */
2+
3+
/* Linker script to configure memory regions. */
4+
MEMORY
5+
{
6+
RAM0 (rwx) : ORIGIN = 0x10000114, LENGTH = (128K - 0x114)
7+
RAM1 (rwx) : ORIGIN = 0x10080000, LENGTH = 72K
8+
9+
RAM_AHB0 (rwx) : ORIGIN = 0x20000000, LENGTH = 32K
10+
RAM_AHB1 (rwx) : ORIGIN = 0x20008000, LENGTH = 32K
11+
12+
SPIFI (rx) : ORIGIN = 0x14000000, LENGTH = 32M
13+
}
14+
15+
/* Linker script to place sections and symbol values. Should be used together
16+
* with other linker script that defines memory regions FLASH and RAM.
17+
* It references following symbols, which must be defined in code:
18+
* Reset_Handler : Entry of reset handler
19+
*
20+
* It defines following symbols, which code can use without definition:
21+
* __exidx_start
22+
* __exidx_end
23+
* __etext
24+
* __data_start__
25+
* __preinit_array_start
26+
* __preinit_array_end
27+
* __init_array_start
28+
* __init_array_end
29+
* __fini_array_start
30+
* __fini_array_end
31+
* __data_end__
32+
* __bss_start__
33+
* __bss_end__
34+
* __end__
35+
* end
36+
* __HeapLimit
37+
* __StackLimit
38+
* __StackTop
39+
* __stack
40+
*/
41+
ENTRY(Reset_Handler)
42+
43+
SECTIONS
44+
{
45+
.text :
46+
{
47+
KEEP(*(.isr_vector))
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+
} > SPIFI
71+
72+
.ARM.extab :
73+
{
74+
*(.ARM.extab* .gnu.linkonce.armextab.*)
75+
} > SPIFI
76+
77+
__exidx_start = .;
78+
.ARM.exidx :
79+
{
80+
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
81+
} > SPIFI
82+
__exidx_end = .;
83+
84+
__etext = .;
85+
86+
.data : AT (__etext)
87+
{
88+
__data_start__ = .;
89+
Image$$RW_IRAM1$$Base = .;
90+
*(vtable)
91+
*(.data*)
92+
93+
. = ALIGN(4);
94+
/* preinit data */
95+
PROVIDE (__preinit_array_start = .);
96+
KEEP(*(.preinit_array))
97+
PROVIDE (__preinit_array_end = .);
98+
99+
. = ALIGN(4);
100+
/* init data */
101+
PROVIDE (__init_array_start = .);
102+
KEEP(*(SORT(.init_array.*)))
103+
KEEP(*(.init_array))
104+
PROVIDE (__init_array_end = .);
105+
106+
107+
. = ALIGN(4);
108+
/* finit data */
109+
PROVIDE (__fini_array_start = .);
110+
KEEP(*(SORT(.fini_array.*)))
111+
KEEP(*(.fini_array))
112+
PROVIDE (__fini_array_end = .);
113+
114+
. = ALIGN(4);
115+
/* All data end */
116+
__data_end__ = .;
117+
118+
} > RAM0
119+
120+
121+
.bss :
122+
{
123+
__bss_start__ = .;
124+
*(.bss*)
125+
*(COMMON)
126+
__bss_end__ = .;
127+
Image$$RW_IRAM1$$ZI$$Limit = . ;
128+
} > RAM1
129+
130+
131+
.heap :
132+
{
133+
__end__ = .;
134+
end = __end__;
135+
*(.heap*)
136+
__HeapLimit = .;
137+
} > RAM1
138+
139+
/* .stack_dummy section doesn't contains any symbols. It is only
140+
* used for linker to calculate size of stack sections, and assign
141+
* values to stack symbols later */
142+
.stack_dummy :
143+
{
144+
*(.stack)
145+
} > RAM1
146+
147+
/* Set stack top to end of RAM, and stack limit move down by
148+
* size of stack_dummy section */
149+
__StackTop = ORIGIN(RAM1) + LENGTH(RAM1);
150+
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
151+
PROVIDE(__stack = __StackTop);
152+
153+
/* Check if data + heap + stack exceeds RAM limit */
154+
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
155+
156+
157+
/* Code can explicitly ask for data to be
158+
placed in these higher RAM banks where
159+
they will be left uninitialized.
160+
*/
161+
.AHBSRAM0 (NOLOAD):
162+
{
163+
Image$$RW_IRAM2$$Base = . ;
164+
*(AHBSRAM0)
165+
Image$$RW_IRAM2$$ZI$$Limit = .;
166+
} > RAM_AHB0
167+
168+
.AHBSRAM1 (NOLOAD):
169+
{
170+
Image$$RW_IRAM3$$Base = . ;
171+
*(AHBSRAM1)
172+
Image$$RW_IRAM3$$ZI$$Limit = .;
173+
} > RAM_AHB1
174+
}

0 commit comments

Comments
 (0)