You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2026/03/10 09:38:31 UTC
(nuttx) 06/07: arch/tricore: change heap symbol to support multi config
This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 4be3075a5c037bb5b85b9770c534da6cb88a4649
Author: zhangyuan29 <zh...@xiaomi.com>
AuthorDate: Mon May 12 20:54:27 2025 +0800
arch/tricore: change heap symbol to support multi config
Let the linker script decide the location of the heap.
Signed-off-by: zhangyuan29 <zh...@xiaomi.com>
---
arch/tricore/src/common/tricore_allocateheap.c | 4 ++--
arch/tricore/src/common/tricore_internal.h | 15 ++-------------
2 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/arch/tricore/src/common/tricore_allocateheap.c b/arch/tricore/src/common/tricore_allocateheap.c
index 9b618277704..23e9d2cf9cd 100644
--- a/arch/tricore/src/common/tricore_allocateheap.c
+++ b/arch/tricore/src/common/tricore_allocateheap.c
@@ -68,6 +68,6 @@
void up_allocate_heap(void **heap_start, size_t *heap_size)
{
- *heap_start = _edata;
- *heap_size = (size_t)((uintptr_t)_eheap - (uintptr_t)_edata);
+ *heap_start = _sheap;
+ *heap_size = (size_t)((uintptr_t)_eheap - (uintptr_t)_sheap);
}
diff --git a/arch/tricore/src/common/tricore_internal.h b/arch/tricore/src/common/tricore_internal.h
index cc83ff0957a..d176b3478d8 100644
--- a/arch/tricore/src/common/tricore_internal.h
+++ b/arch/tricore/src/common/tricore_internal.h
@@ -156,19 +156,8 @@ extern uintptr_t __ISTACK0[];
/* These symbols are setup by the linker script. */
-#ifdef CONFIG_TRICORE_TOOLCHAIN_TASKING
-extern uintptr_t _lc_gb_data[]; /* Start of .data */
-extern uintptr_t _lc_ge_data[]; /* End+1 of .data */
-#define _sdata _lc_gb_data
-#define _edata _lc_ge_data
-#define _eheap __USTACK0_END
-#else
-extern uintptr_t __HEAP[]; /* End+1 of .data */
-extern uintptr_t __A0_MEM[]; /* End+1 of .data */
-#define _sdata LCF_DSPR0_START
-#define _edata __A0_MEM
-#define _eheap __USTACK0_END
-#endif
+extern uintptr_t _sheap[]; /* Start of .heap */
+extern uintptr_t _eheap[]; /* End+1 of .heap */
#endif