Skip to content

Commit 20b3363

Browse files
committed
rtl8195am : fix gpio toggle slow
Ameba has two memory blocks: SDRAM(2M) and SRAM(512KB). SRAM has better access performance than SDRAM. So some timing critical codes must be moved to SRAM. fix for mbed-os issue ARMmbed#5778 rebase for ARMmbed#6289
1 parent f67fe4a commit 20b3363

File tree

2 files changed

+23
-16
lines changed
  • targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device

2 files changed

+23
-16
lines changed

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/TOOLCHAIN_ARM_STD/rtl8195a.sct

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,23 @@ LR_IRAM 0x10007000 (0x70000 - 0x7000) {
2222
*(i.mbedtls*)
2323
*libc.a (+RO)
2424
*rtx_*.o (+RO)
25+
*main*.o (+RO)
26+
*lib_peripheral_mbed_arm.ar (+RO)
27+
*_api*.o (+RO)
2528
}
2629

2730
RW_IRAM1 +0 UNINIT FIXED {
2831
*rtl8195a_crypto*.o(+RW)
2932
*libc.a (+RW)
30-
*(.sdram.data*)
33+
*main*.o (+RW)
3134
*lib_peripheral_mbed_arm.ar (+RW)
32-
*rtl8195a_crypto*.o(+ZI, COMMON)
33-
*libc.a (+ZI, COMMON)
34-
*(.bss.thread_stack_main)
35-
*lib_peripheral_mbed_arm.ar (+ZI, COMMON)
35+
*_api*.o (+RW)
36+
*rtl8195a_crypto*.o(+ZI)
37+
*libc.a (+ZI)
38+
*main*.o (+ZI)
39+
*lib_peripheral_mbed_arm.ar (+ZI)
40+
*_api*.o (+ZI)
41+
*mbed_boot*.o (+ZI)
3642
}
3743

3844
ARM_LIB_STACK (0x10070000 - 0x1000) EMPTY 0x1000 {
@@ -41,8 +47,8 @@ LR_IRAM 0x10007000 (0x70000 - 0x7000) {
4147

4248
LR_TCM 0x1FFF0000 0x10000 {
4349
TCM_OVERLAY 0x1FFF0000 0x10000 {
44-
*lwip_mem*.o(.bss*)
45-
*lwip_memp*.o(.bss*)
50+
*lwip_mem*.o(+ZI)
51+
*lwip_memp*.o(+ZI)
4652
*.o(.tcm.heap*)
4753
}
4854
}

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/TOOLCHAIN_GCC_ARM/rtl8195a.ld

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,17 @@ SECTIONS
6767
.text.sram1 :
6868
{
6969
. = ALIGN(4);
70-
*rtl8195a_crypto.o (.text* .rodata*)
70+
*rtl8195a_crypto*.o (.text* .rodata*)
7171
*mbedtls*.o (.text* .rodata*)
7272
*libc.a: (.text* .rodata*)
73+
*lib_peripheral_mbed_gcc.a: (.text* .rodata*)
74+
*_api*.o (.text* .rodata*)
75+
*main*.o (.text* .rodata*)
7376
} > SRAM1
7477

7578
.text.sram2 :
7679
{
7780
. = ALIGN(4);
78-
*(.mon.ram.text*)
79-
*(.hal.flash.text*)
80-
*(.hal.sdrc.text*)
81-
*(.hal.gpio.text*)
8281
*(.text*)
8382

8483
KEEP(*(.init))
@@ -165,9 +164,11 @@ SECTIONS
165164
.bss.sram1 (NOLOAD) :
166165
{
167166
__bss_sram_start__ = .;
168-
*rtl8195a_crypto.o (.bss* COMMON)
167+
*rtl8195a_crypto*.o (.bss* COMMON)
169168
*mbedtls*.o (.bss* COMMON)
170169
*(.bss.thread_stack_main)
170+
*lib_peripheral_mbed_gcc.a: (.bss* COMMON)
171+
*mbed_boot*.o (.bss* COMMON)
171172
__bss_sram_end__ = .;
172173
} > SRAM1
173174

@@ -198,11 +199,11 @@ SECTIONS
198199
__HeapLimit = .;
199200
} > SRAM1
200201

201-
.TCM_overlay :
202+
.TCM_overlay (NOLOAD):
202203
{
203204
__bss_dtcm_start__ = .;
204-
*lwip_mem.o (.bss*)
205-
*lwip_memp.o (.bss*)
205+
*lwip_mem*.o (.bss* COMMON)
206+
*lwip_memp*.o (.bss* COMMON)
206207
*(.tcm.heap*)
207208
__bss_dtcm_end__ = .;
208209
} > TCM

0 commit comments

Comments
 (0)