Skip to content

Commit 4b27ba7

Browse files
committed
Merge pull request #210 from dinau/lpc1114_codered_exporter
[LPC1114][GCC_CR] Added export functionality
2 parents a3595ae + 07db342 commit 4b27ba7

File tree

7 files changed

+2121
-4
lines changed

7 files changed

+2121
-4
lines changed
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
/* mbed - LPC1114 linker script
2+
* Based linker script generated by Code Red Technologies Red Suite 4.1
3+
*/
4+
GROUP(libgcc.a libc_s.a libstdc++_s.a libm.a libcr_newlib_nohost.a crti.o crtn.o crtbegin.o crtend.o)
5+
MEMORY
6+
{
7+
/* Define each memory region */
8+
MFlash32 (rx) : ORIGIN = 0x0, LENGTH = 0x8000 /* 32k */
9+
RamLoc8 (rwx) : ORIGIN = 0x100000C0, LENGTH = 0x0F40 /* 4k */
10+
}
11+
/* Define a symbol for the top of each memory region */
12+
__top_MFlash32 = 0x0 + 0x8000;
13+
__top_RamLoc8 = 0x10000000 + 0x0F40;
14+
15+
ENTRY(ResetISR)
16+
17+
SECTIONS
18+
{
19+
20+
/* MAIN TEXT SECTION */
21+
.text : ALIGN(4)
22+
{
23+
FILL(0xff)
24+
KEEP(*(.isr_vector))
25+
*(.text.ResetISR)
26+
*(.text.SystemInit)
27+
. = 0x200;
28+
29+
/* Global Section Table */
30+
. = ALIGN(4) ;
31+
__section_table_start = .;
32+
__data_section_table = .;
33+
LONG(LOADADDR(.data));
34+
LONG( ADDR(.data)) ;
35+
LONG( SIZEOF(.data));
36+
__data_section_table_end = .;
37+
__bss_section_table = .;
38+
LONG( ADDR(.bss));
39+
LONG( SIZEOF(.bss));
40+
__bss_section_table_end = .;
41+
__section_table_end = . ;
42+
/* End of Global Section Table */
43+
44+
45+
*(.after_vectors*)
46+
47+
*(.text*)
48+
*(.rodata .rodata.*)
49+
. = ALIGN(4);
50+
51+
/* C++ constructors etc */
52+
. = ALIGN(4);
53+
KEEP(*(.init))
54+
55+
. = ALIGN(4);
56+
__preinit_array_start = .;
57+
KEEP (*(.preinit_array))
58+
__preinit_array_end = .;
59+
60+
. = ALIGN(4);
61+
__init_array_start = .;
62+
KEEP (*(SORT(.init_array.*)))
63+
KEEP (*(.init_array))
64+
__init_array_end = .;
65+
66+
KEEP(*(.fini));
67+
68+
. = ALIGN(0x4);
69+
KEEP (*crtbegin.o(.ctors))
70+
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
71+
KEEP (*(SORT(.ctors.*)))
72+
KEEP (*crtend.o(.ctors))
73+
74+
. = ALIGN(0x4);
75+
KEEP (*crtbegin.o(.dtors))
76+
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
77+
KEEP (*(SORT(.dtors.*)))
78+
KEEP (*crtend.o(.dtors))
79+
/* End C++ */
80+
} > MFlash32
81+
82+
/*
83+
* for exception handling/unwind - some Newlib functions (in common
84+
* with C++ and STDC++) use this.
85+
*/
86+
.ARM.extab : ALIGN(4)
87+
{
88+
*(.ARM.extab* .gnu.linkonce.armextab.*)
89+
} > MFlash32
90+
__exidx_start = .;
91+
92+
.ARM.exidx : ALIGN(4)
93+
{
94+
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
95+
} > MFlash32
96+
__exidx_end = .;
97+
98+
_etext = .;
99+
100+
101+
102+
/* MAIN DATA SECTION */
103+
104+
.uninit_RESERVED : ALIGN(4)
105+
{
106+
KEEP(*(.bss.$RESERVED*))
107+
} > RamLoc8
108+
109+
.data : ALIGN(4)
110+
{
111+
FILL(0xff)
112+
_data = .;
113+
*(vtable)
114+
*(.data*)
115+
. = ALIGN(4) ;
116+
_edata = .;
117+
} > RamLoc8 AT>MFlash32
118+
119+
120+
121+
/* MAIN BSS SECTION */
122+
.bss : ALIGN(4)
123+
{
124+
_bss = .;
125+
*(.bss*)
126+
*(COMMON)
127+
. = ALIGN(4) ;
128+
_ebss = .;
129+
PROVIDE(end = .);
130+
__end__ = .;
131+
} > RamLoc8
132+
133+
PROVIDE(_pvHeapStart = .);
134+
PROVIDE(_vStackTop = __top_RamLoc8 - 0);
135+
}

libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11XX_11CXX/TOOLCHAIN_GCC_CR/startup_LPC11xx.cpp renamed to libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11XX_11CXX/TOOLCHAIN_GCC_CR/TARGET_LPC11XX/startup_LPC11xx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
extern "C" {
22

3-
#include "LPC11Uxx.h"
3+
#include "LPC11xx.h"
44

55
#define WEAK __attribute__ ((weak))
66
#define ALIAS(f) __attribute__ ((weak, alias (#f)))

workspace_tools/export/codered.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
class CodeRed(Exporter):
2222
NAME = 'CodeRed'
23-
TARGETS = ['LPC1768', 'LPC4088']
23+
TARGETS = ['LPC1768', 'LPC4088','LPC1114']
2424
TOOLCHAIN = 'GCC_CR'
2525

2626
def generate(self):

0 commit comments

Comments
 (0)