This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit d158eb8356263008c6e03857a1ccfa4e12feed33
Author: zhangyu117 <[email protected]>
AuthorDate: Mon Feb 10 11:22:03 2025 +0800

    arch/tricore: add dlmu
    
    Add the DLMU region to the heap when multiple memory regions are configured.
    
    Signed-off-by: zhangyu117 <[email protected]>
---
 arch/tricore/src/common/tricore_initialize.c | 4 ++++
 arch/tricore/src/common/tricore_internal.h   | 8 ++++++++
 2 files changed, 12 insertions(+)

diff --git a/arch/tricore/src/common/tricore_initialize.c 
b/arch/tricore/src/common/tricore_initialize.c
index b6f4625050e..a73fa354647 100644
--- a/arch/tricore/src/common/tricore_initialize.c
+++ b/arch/tricore/src/common/tricore_initialize.c
@@ -69,6 +69,10 @@ void up_initialize(void)
   up_enable_dcache();
 #endif
 
+#if CONFIG_MM_REGIONS > 1
+  tricore_addregion();
+#endif
+
   /* Initialize the serial device driver */
 
 #ifdef USE_SERIALDRIVER
diff --git a/arch/tricore/src/common/tricore_internal.h 
b/arch/tricore/src/common/tricore_internal.h
index e46bd0df6c7..985c0d336d0 100644
--- a/arch/tricore/src/common/tricore_internal.h
+++ b/arch/tricore/src/common/tricore_internal.h
@@ -274,4 +274,12 @@ size_t tricore_stack_check(uintptr_t alloc, size_t size);
 void tricore_stack_color(void *stackbase, size_t nbytes);
 #endif
 
+/* Memory management ********************************************************/
+
+#if CONFIG_MM_REGIONS > 1
+void tricore_addregion(void);
+#else
+#  define tricore_addregion()
+#endif
+
 #endif /* __ARCH_TRICORE_SRC_COMMON_TRICORE_INTERNAL_H */

Reply via email to