Skip to content

Commit f452213

Browse files
Archcadyc1728p9
authored andcommitted
Resolve Realtek device small code space issue
switch on TCM section usage, this should give user code more codespace.
1 parent 8232afa commit f452213

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ LR_RAM 0x10006000 0x6FFFF {
3737
RW_IRAM1 +0 UNINIT FIXED {
3838
.ANY (+ZI)
3939
}
40+
41+
TCM_OVERLAY 0x1FFF0000 0x10000{
42+
lwip_mem.o(.bss*)
43+
lwip_memp.o(.bss*)
44+
*.o(.tcm.heap*)
45+
}
4046
}
4147

4248
LR_DRAM 0x30000000 0x1FFFFF{

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/TOOLCHAIN_GCC_ARM/rlx8195A-symbol-v02-img2.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,8 @@ SECTIONS
827827

828828
.TCM_overlay :
829829
{
830+
*lwip_mem.o (.bss*)
831+
*lwip_memp.o (.bss*)
830832
*(.tcm.heap*)
831833
} > TCM
832834

targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/TOOLCHAIN_IAR/rtl8195a.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ place at start of SDRAM_RAM_region {
208208

209209
/* TCM placement */
210210
define overlay TCM_overlay {
211-
section .tcm.heap,
211+
section .tcm.heap,
212212
section .bss object lwip_mem.o,
213213
section .bss object lwip_memp.o,
214214
block .heap,

targets/TARGET_Realtek/TARGET_AMEBA/sdk/common/drivers/wlan/realtek/include/autoconf.h

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

108108
#if defined(CONFIG_PLATFORM_AMEBA_X)
109109
#if !defined(CONFIG_PLATFORM_8711B)
110-
#define CONFIG_USE_TCM_HEAP 0 /* USE TCM HEAP */
110+
#define CONFIG_USE_TCM_HEAP 1 /* USE TCM HEAP */
111111
#endif
112112
#define CONFIG_RECV_TASKLET_THREAD
113113
#define CONFIG_XMIT_TASKLET_THREAD

targets/TARGET_Realtek/TARGET_AMEBA/sdk/os/os_dep/include/osdep_service.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ extern "C" {
3232

3333
#if defined(CONFIG_PLATFORM_8195A)
3434
#ifndef CONFIG_USE_TCM_HEAP
35-
#define CONFIG_USE_TCM_HEAP 0 /* USE TCM HEAP */
35+
#define CONFIG_USE_TCM_HEAP 1 /* USE TCM HEAP */
3636
#endif
3737
#define USE_MUTEX_FOR_SPINLOCK 1
3838
#endif

0 commit comments

Comments
 (0)