Skip to content

Commit eab458d

Browse files
authored
Merge branch 'master' into nuvoton_nuc472
2 parents 2febf68 + 3632693 commit eab458d

File tree

15 files changed

+779
-309
lines changed

15 files changed

+779
-309
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ script:
2424
env:
2525
# - RTT_BSP='simulator' RTT_CC='clang-analyze' RTT_EXEC_PATH=/usr/share/clang/scan-build
2626
- RTT_BSP='CME_M7' RTT_TOOL_CHAIN='sourcery-arm'
27-
# - RTT_BSP='apollo2' RTT_TOOL_CHAIN='sourcery-arm'
27+
- RTT_BSP='apollo2' RTT_TOOL_CHAIN='sourcery-arm'
2828
- RTT_BSP='asm9260t' RTT_TOOL_CHAIN='sourcery-arm'
2929
- RTT_BSP='at91sam9260' RTT_TOOL_CHAIN='sourcery-arm'
3030
- RTT_BSP='allwinner_tina' RTT_TOOL_CHAIN='sourcery-arm'
@@ -59,6 +59,7 @@ env:
5959
# - RTT_BSP='mini4020' # no scons
6060
# - RTT_BSP='nios_ii' # no scons
6161
- RTT_BSP='nuvoton_nuc472' RTT_TOOL_CHAIN='sourcery-arm'
62+
- RTT_BSP='nuvoton_m05x' RTT_TOOL_CHAIN='sourcery-arm'
6263
# - RTT_BSP='pic32ethernet' # no scons
6364
- RTT_BSP='qemu-vexpress-a9' RTT_TOOL_CHAIN='sourcery-arm'
6465
- RTT_BSP='sam7x' RTT_TOOL_CHAIN='sourcery-arm'

bsp/apollo2/libraries/drivers/hal/am_hal_iom.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ am_hal_iom_workaround_word_write(uint32_t ui32ChipSelect,
11221122
//! @return None.
11231123
//
11241124
//*****************************************************************************
1125-
#if defined(__GNUC_STDC_INLINE__)
1125+
#if defined(__GNUC__)
11261126
static void __attribute__((naked))
11271127
iom_workaround_loop(uint32_t ui32PadRegVal, volatile uint32_t *pui32PadReg,
11281128
bool bRising)
@@ -1164,8 +1164,7 @@ iom_workaround_loop(uint32_t ui32PadRegVal, volatile uint32_t *pui32PadReg,
11641164
__asm(" str r0, [r1]");
11651165
__asm(" bx lr");
11661166
}
1167-
#endif
1168-
#ifdef keil
1167+
#elif defined(__CC_ARM)
11691168
__asm static void
11701169
iom_workaround_loop(uint32_t ui32PadRegVal, volatile uint32_t *pui32PadReg,
11711170
bool bRising)
@@ -1208,8 +1207,7 @@ falling_check_mosi
12081207
bx lr
12091208
nop
12101209
}
1211-
#endif
1212-
#ifdef iar
1210+
#elif defined(__ICCARM__)
12131211
static void
12141212
iom_workaround_loop(uint32_t ui32PadRegVal, volatile uint32_t *pui32PadReg,
12151213
bool bRising)

bsp/apollo2/libraries/startup/SConscript

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ src = Split("""
1111

1212
# add for startup script
1313
if rtconfig.CROSS_TOOL == 'gcc':
14-
src = src + ['gcc_ride7/' + 'startup_gcc.c']
14+
src = src + ['gcc/' + 'startup_gcc.c']
1515
elif rtconfig.CROSS_TOOL == 'keil':
1616
src = src + ['arm/' + 'startup_keil.s']
1717
elif rtconfig.CROSS_TOOL == 'iar':
1818
src = src + ['iar/' + 'startup_iar.c']
1919

2020
path = [cwd]
2121

22-
CPPDEFINES = ['AM_PACKAGE_BGA', 'AM_PART_APOLLO2', 'keil']
22+
CPPDEFINES = ['AM_PACKAGE_BGA', 'AM_PART_APOLLO2']
2323

2424
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
2525

bsp/apollo2/rtconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
DEVICE = ' -mcpu=cortex-m4 -mthumb -ffunction-sections -fdata-sections'
4444
CFLAGS = DEVICE
4545
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
46-
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-apollo2.map,-cref,-u,Reset_Handler -T'
46+
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-apollo2.map,-cref,-u,am_reset_isr -T rtthread_link.ld'
4747

4848
CPATH = ''
4949
LPATH = ''

bsp/apollo2/rtthread_link.ld

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
/*
2+
* linker script for STM32F10x with GNU ld
3+
* bernard.xiong 2009-10-14
4+
*/
5+
6+
/* Program Entry, set to mark it as "used" and avoid gc */
7+
MEMORY
8+
{
9+
CODE (rx) : ORIGIN = 0x00000000, LENGTH = 1024k /* 1024KB flash */
10+
DATA (rw) : ORIGIN = 0x10000000, LENGTH = 256k /* 128K sram */
11+
}
12+
ENTRY(am_reset_isr)
13+
_system_stack_size = 0x200;
14+
15+
SECTIONS
16+
{
17+
.text :
18+
{
19+
. = ALIGN(4);
20+
_stext = .;
21+
KEEP(*(.isr_vector)) /* Startup code */
22+
. = ALIGN(4);
23+
*(.text) /* remaining code */
24+
*(.text.*) /* remaining code */
25+
*(.rodata) /* read-only data (constants) */
26+
*(.rodata*)
27+
*(.glue_7)
28+
*(.glue_7t)
29+
*(.gnu.linkonce.t*)
30+
31+
/* section information for finsh shell */
32+
. = ALIGN(4);
33+
__fsymtab_start = .;
34+
KEEP(*(FSymTab))
35+
__fsymtab_end = .;
36+
. = ALIGN(4);
37+
__vsymtab_start = .;
38+
KEEP(*(VSymTab))
39+
__vsymtab_end = .;
40+
. = ALIGN(4);
41+
42+
/* section information for initial. */
43+
. = ALIGN(4);
44+
__rt_init_start = .;
45+
KEEP(*(SORT(.rti_fn*)))
46+
__rt_init_end = .;
47+
. = ALIGN(4);
48+
49+
. = ALIGN(4);
50+
_etext = .;
51+
} > CODE = 0
52+
53+
/* .ARM.exidx is sorted, so has to go in its own output section. */
54+
__exidx_start = .;
55+
.ARM.exidx :
56+
{
57+
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
58+
59+
/* This is used by the startup in order to initialize the .data secion */
60+
_init_data = .;
61+
} > CODE
62+
__exidx_end = .;
63+
64+
/* .data section which is used for initialized data */
65+
66+
.data : AT (_init_data)
67+
{
68+
. = ALIGN(4);
69+
/* This is used by the startup in order to initialize the .data secion */
70+
_sdata = . ;
71+
72+
*(.data)
73+
*(.data.*)
74+
*(.gnu.linkonce.d*)
75+
76+
. = ALIGN(4);
77+
/* This is used by the startup in order to initialize the .data secion */
78+
_edata = . ;
79+
} >DATA
80+
81+
.stack :
82+
{
83+
. = . + _system_stack_size;
84+
. = ALIGN(4);
85+
_estack = .;
86+
} >DATA
87+
88+
__bss_start = .;
89+
.bss :
90+
{
91+
. = ALIGN(4);
92+
/* This is used by the startup in order to initialize the .bss secion */
93+
_sbss = .;
94+
95+
*(.bss)
96+
*(.bss.*)
97+
*(COMMON)
98+
99+
. = ALIGN(4);
100+
/* This is used by the startup in order to initialize the .bss secion */
101+
_ebss = . ;
102+
103+
*(.bss.init)
104+
} > DATA
105+
__bss_end = .;
106+
107+
_end = .;
108+
109+
/* Stabs debugging sections. */
110+
.stab 0 : { *(.stab) }
111+
.stabstr 0 : { *(.stabstr) }
112+
.stab.excl 0 : { *(.stab.excl) }
113+
.stab.exclstr 0 : { *(.stab.exclstr) }
114+
.stab.index 0 : { *(.stab.index) }
115+
.stab.indexstr 0 : { *(.stab.indexstr) }
116+
.comment 0 : { *(.comment) }
117+
/* DWARF debug sections.
118+
* Symbols in the DWARF debugging sections are relative to the beginning
119+
* of the section so we begin them at 0. */
120+
/* DWARF 1 */
121+
.debug 0 : { *(.debug) }
122+
.line 0 : { *(.line) }
123+
/* GNU DWARF 1 extensions */
124+
.debug_srcinfo 0 : { *(.debug_srcinfo) }
125+
.debug_sfnames 0 : { *(.debug_sfnames) }
126+
/* DWARF 1.1 and DWARF 2 */
127+
.debug_aranges 0 : { *(.debug_aranges) }
128+
.debug_pubnames 0 : { *(.debug_pubnames) }
129+
/* DWARF 2 */
130+
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
131+
.debug_abbrev 0 : { *(.debug_abbrev) }
132+
.debug_line 0 : { *(.debug_line) }
133+
.debug_frame 0 : { *(.debug_frame) }
134+
.debug_str 0 : { *(.debug_str) }
135+
.debug_loc 0 : { *(.debug_loc) }
136+
.debug_macinfo 0 : { *(.debug_macinfo) }
137+
/* SGI/MIPS DWARF 2 extensions */
138+
.debug_weaknames 0 : { *(.debug_weaknames) }
139+
.debug_funcnames 0 : { *(.debug_funcnames) }
140+
.debug_typenames 0 : { *(.debug_typenames) }
141+
.debug_varnames 0 : { *(.debug_varnames) }
142+
}

0 commit comments

Comments
 (0)