You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/06/26 14:52:53 UTC

[incubator-nuttx] branch master updated (db18a12 -> e401aa1)

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

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from db18a12  xtensa/esp32: Move RTC WDT deinit after initial setup
     new 0a4982a  Introduce ARCH_HAVE_EXTRA_HEAPS, this config is going to be used for chips that have multiple separate heaps. For now it's used to enable APIs to initialize the different heaps during the start sequence but can be extended for other purposes that manage those heaps.
     new fc9c320  arch/arm/cxd56xx: Remove the up_textheap_init function since it's not needed anymore.
     new add18b9  arch/risc-v/esp32c3: Remove the up_textheap_init function since it's not needed anymore.
     new 553f070  arch/xtensa/esp32: Remove up_textheap_init function since it's not needed anymore.
     new e401aa1  boards/xtensa/esp32: Update the defconfigs to account for the changes in TEXT_HEAP and the introduction of ESP32_IRAM_HEAP and ARCH_HAVE_EXTRA_HEAPS

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/Kconfig                                       | 12 ++++++--
 arch/arm/src/cxd56xx/cxd56_textheap.c              |  8 -----
 arch/risc-v/src/esp32c3/Kconfig                    |  1 +
 arch/risc-v/src/esp32c3/Make.defs                  |  4 +++
 .../risc-v/src/esp32c3/esp32c3_extraheaps.c        | 35 ++++++++++++---------
 arch/risc-v/src/esp32c3/esp32c3_textheap.c         | 13 --------
 arch/xtensa/src/esp32/Kconfig                      |  6 ++++
 arch/xtensa/src/esp32/Make.defs                    | 17 +++++++---
 .../xtensa/src/esp32/esp32_extraheaps.c            | 36 ++++++++++++++--------
 arch/xtensa/src/esp32/esp32_textheap.c             | 24 ++++++---------
 .../esp32/esp32-devkitc/configs/elf/defconfig      |  1 +
 .../esp32/esp32-devkitc/configs/module/defconfig   |  2 +-
 .../esp32/esp32-devkitc/configs/sotest/defconfig   |  2 +-
 include/nuttx/arch.h                               | 12 ++++----
 sched/init/nx_start.c                              |  6 ++--
 15 files changed, 99 insertions(+), 80 deletions(-)
 copy boards/arm/xmc4/xmc4700-relax/src/xmc4_bringup.c => arch/risc-v/src/esp32c3/esp32c3_extraheaps.c (78%)
 copy boards/arm/xmc4/xmc4700-relax/src/xmc4_bringup.c => arch/xtensa/src/esp32/esp32_extraheaps.c (76%)

[incubator-nuttx] 05/05: boards/xtensa/esp32: Update the defconfigs to account for the changes in TEXT_HEAP and the introduction of ESP32_IRAM_HEAP and ARCH_HAVE_EXTRA_HEAPS

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e401aa17f62e66ed5d07effbaeddda017c5a5730
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Fri Jun 25 15:15:13 2021 +0100

    boards/xtensa/esp32: Update the defconfigs to account for the changes in
    TEXT_HEAP and the introduction of ESP32_IRAM_HEAP and ARCH_HAVE_EXTRA_HEAPS
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 boards/xtensa/esp32/esp32-devkitc/configs/elf/defconfig    | 1 +
 boards/xtensa/esp32/esp32-devkitc/configs/module/defconfig | 2 +-
 boards/xtensa/esp32/esp32-devkitc/configs/sotest/defconfig | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/elf/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/elf/defconfig
index 672a529..0847920 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/elf/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/elf/defconfig
@@ -22,6 +22,7 @@ CONFIG_BOARDCTL_ROMDISK=y
 CONFIG_BOARD_LOOPSPERMSEC=16717
 CONFIG_BUILTIN=y
 CONFIG_ELF=y
+CONFIG_ESP32_IRAM_HEAP=y
 CONFIG_ESP32_UART0=y
 CONFIG_EXAMPLES_ELF=y
 CONFIG_EXAMPLES_HELLO=y
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/module/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/module/defconfig
index daf0f29..3825f2c 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/module/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/module/defconfig
@@ -30,6 +30,7 @@ CONFIG_DEBUG_FULLOPT=y
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DEBUG_WARN=y
+CONFIG_ESP32_IRAM_HEAP=y
 CONFIG_ESP32_UART0=y
 CONFIG_EXAMPLES_MODULE=y
 CONFIG_EXPERIMENTAL=y
@@ -37,7 +38,6 @@ CONFIG_FS_PROCFS=y
 CONFIG_FS_ROMFS=y
 CONFIG_HAVE_CXX=y
 CONFIG_HAVE_CXXINITIALIZE=y
-CONFIG_HOST_MACOS=y
 CONFIG_IDLETHREAD_STACKSIZE=3072
 CONFIG_INTELHEX_BINARY=y
 CONFIG_MAX_TASKS=16
diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/sotest/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/sotest/defconfig
index d5018b8..df89610 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/sotest/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/sotest/defconfig
@@ -31,6 +31,7 @@ CONFIG_DEBUG_FULLOPT=y
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DEBUG_WARN=y
+CONFIG_ESP32_IRAM_HEAP=y
 CONFIG_ESP32_UART0=y
 CONFIG_EXAMPLES_SOTEST=y
 CONFIG_EXPERIMENTAL=y
@@ -38,7 +39,6 @@ CONFIG_FS_PROCFS=y
 CONFIG_FS_ROMFS=y
 CONFIG_HAVE_CXX=y
 CONFIG_HAVE_CXXINITIALIZE=y
-CONFIG_HOST_MACOS=y
 CONFIG_IDLETHREAD_STACKSIZE=3072
 CONFIG_INTELHEX_BINARY=y
 CONFIG_LIBC_DLFCN=y

[incubator-nuttx] 02/05: arch/arm/cxd56xx: Remove the up_textheap_init function since it's not needed anymore.

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit fc9c320bd8e44d53fe34b487acb0a2dc26937574
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Fri Jun 25 15:12:14 2021 +0100

    arch/arm/cxd56xx: Remove the up_textheap_init function since it's not
    needed anymore.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 arch/arm/src/cxd56xx/cxd56_textheap.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/arm/src/cxd56xx/cxd56_textheap.c b/arch/arm/src/cxd56xx/cxd56_textheap.c
index 3c5c04c..95bf571 100644
--- a/arch/arm/src/cxd56xx/cxd56_textheap.c
+++ b/arch/arm/src/cxd56xx/cxd56_textheap.c
@@ -44,14 +44,6 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: up_textheap_init()
- ****************************************************************************/
-
-void up_textheap_init()
-{
-}
-
-/****************************************************************************
  * Name: up_textheap_memalign()
  ****************************************************************************/
 

[incubator-nuttx] 04/05: arch/xtensa/esp32: Remove up_textheap_init function since it's not needed anymore.

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 553f070357bbd1ffd393d978dd34ef6d56782605
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Fri Jun 25 15:13:48 2021 +0100

    arch/xtensa/esp32: Remove up_textheap_init function since it's not
    needed anymore.
    
    Decouple the IRAM heap from the text allocator since that heap can
    still be used as a generic pool of memory.
    
    Implement the up_extraheaps_init function to initialize all of the
    additional heaps.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 arch/xtensa/src/esp32/Kconfig                      |  6 ++
 arch/xtensa/src/esp32/Make.defs                    | 17 ++++--
 .../esp32/{esp32_textheap.c => esp32_extraheaps.c} | 65 +++-------------------
 arch/xtensa/src/esp32/esp32_textheap.c             | 24 +++-----
 4 files changed, 36 insertions(+), 76 deletions(-)

diff --git a/arch/xtensa/src/esp32/Kconfig b/arch/xtensa/src/esp32/Kconfig
index ddcb46d..29e0f98 100644
--- a/arch/xtensa/src/esp32/Kconfig
+++ b/arch/xtensa/src/esp32/Kconfig
@@ -233,6 +233,12 @@ config ESP32_RUN_IRAM
 
 config ESP32_RTC_HEAP
 	bool "Use the RTC memory as a separate heap"
+	select ARCH_HAVE_EXTRA_HEAPS
+	default n
+
+config ESP32_IRAM_HEAP
+	bool "Use the rest of IRAM as a separate heap"
+	select ARCH_HAVE_EXTRA_HEAPS
 	default n
 
 menu "ESP32 Peripheral Selection"
diff --git a/arch/xtensa/src/esp32/Make.defs b/arch/xtensa/src/esp32/Make.defs
index 7c31b94..89ac4fa 100644
--- a/arch/xtensa/src/esp32/Make.defs
+++ b/arch/xtensa/src/esp32/Make.defs
@@ -97,10 +97,6 @@ ifeq ($(CONFIG_XTENSA_IMEM_USE_SEPARATE_HEAP),y)
 CHIP_CSRCS += esp32_imm.c
 endif
 
-ifeq ($(CONFIG_ESP32_RTC_HEAP),y)
-CHIP_CSRCS += esp32_rtcheap.c
-endif
-
 ifeq ($(CONFIG_ESP32_I2C),y)
 CHIP_CSRCS += esp32_i2c.c
 endif
@@ -184,8 +180,19 @@ CHIP_CSRCS += esp32_wdt_lowerhalf.c
 endif
 endif
 
-ifeq ($(CONFIG_ARCH_USE_TEXT_HEAP),y)
+ifeq ($(CONFIG_ARCH_HAVE_EXTRA_HEAPS),y)
+CHIP_CSRCS += esp32_extraheaps.c
+endif
+
+ifeq ($(CONFIG_ESP32_RTC_HEAP),y)
+CHIP_CSRCS += esp32_rtcheap.c
+endif
+
+ifeq ($(CONFIG_ESP32_IRAM_HEAP),y)
 CHIP_CSRCS += esp32_iramheap.c
+endif
+
+ifeq ($(CONFIG_ARCH_USE_TEXT_HEAP),y)
 CHIP_CSRCS += esp32_textheap.c
 CMN_ASRCS += xtensa_loadstore.S
 endif
diff --git a/arch/xtensa/src/esp32/esp32_textheap.c b/arch/xtensa/src/esp32/esp32_extraheaps.c
similarity index 59%
copy from arch/xtensa/src/esp32/esp32_textheap.c
copy to arch/xtensa/src/esp32/esp32_extraheaps.c
index 8f7a497..9b0caac 100644
--- a/arch/xtensa/src/esp32/esp32_textheap.c
+++ b/arch/xtensa/src/esp32/esp32_extraheaps.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/xtensa/src/esp32/esp32_textheap.c
+ * arch/xtensa/src/esp32/esp32_extraheaps.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -23,8 +23,8 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
+
 #include <nuttx/arch.h>
-#include <nuttx/fs/procfs.h>
 #include <nuttx/mm/mm.h>
 
 #include <sys/types.h>
@@ -32,7 +32,10 @@
 
 #include "hardware/esp32_soc.h"
 
+#ifdef CONFIG_ESP32_IRAM_HEAP
 #include "esp32_iramheap.h"
+#endif
+
 #ifdef CONFIG_ESP32_RTC_HEAP
 #include "esp32_rtcheap.h"
 #endif
@@ -42,71 +45,21 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: up_textheap_init
+ * Name: up_extraheaps_init
  *
  * Description:
- *   Initialize the text heap.
+ *   Initialize any extra heap.
  *
  ****************************************************************************/
 
-void up_textheap_init()
+void up_extraheaps_init(void)
 {
 #ifdef CONFIG_ESP32_RTC_HEAP
   esp32_rtcheap_initialize();
 #endif
 
+#ifdef CONFIG_ESP32_IRAM_HEAP
   esp32_iramheap_initialize();
-}
-
-/****************************************************************************
- * Name: up_textheap_memalign
- *
- * Description:
- *   Allocate memory from the text heap with the specified alignment.
- *
- ****************************************************************************/
-
-FAR void *up_textheap_memalign(size_t align, size_t size)
-{
-  FAR void *ret = NULL;
-
-  /* Prioritise allocating from RTC. If that fails, allocate from the
-   * main heap.
-   */
-
-#ifdef CONFIG_ESP32_RTC_HEAP
-  ret = esp32_rtcheap_memalign(align, size);
 #endif
-
-  if (ret == NULL)
-    {
-      ret = esp32_iramheap_memalign(align, size);
-    }
-
-  return ret;
 }
 
-/****************************************************************************
- * Name: up_textheap_free
- *
- * Description:
- *   Free memory from the text heap.
- *
- ****************************************************************************/
-
-void up_textheap_free(FAR void *p)
-{
-  if (p)
-    {
-#ifdef CONFIG_ESP32_RTC_HEAP
-      if (esp32_ptr_rtcslow(p))
-        {
-          esp32_rtcheap_free(p);
-        }
-      else
-#endif
-        {
-          esp32_iramheap_free(p);
-        }
-    }
-}
diff --git a/arch/xtensa/src/esp32/esp32_textheap.c b/arch/xtensa/src/esp32/esp32_textheap.c
index 8f7a497..7e29c2f 100644
--- a/arch/xtensa/src/esp32/esp32_textheap.c
+++ b/arch/xtensa/src/esp32/esp32_textheap.c
@@ -32,31 +32,25 @@
 
 #include "hardware/esp32_soc.h"
 
+#ifdef CONFIG_ESP32_IRAM_HEAP
 #include "esp32_iramheap.h"
+#endif
+
 #ifdef CONFIG_ESP32_RTC_HEAP
 #include "esp32_rtcheap.h"
 #endif
 
 /****************************************************************************
- * Public Functions
+ * Pre-processor Definitions
  ****************************************************************************/
 
-/****************************************************************************
- * Name: up_textheap_init
- *
- * Description:
- *   Initialize the text heap.
- *
- ****************************************************************************/
-
-void up_textheap_init()
-{
-#ifdef CONFIG_ESP32_RTC_HEAP
-  esp32_rtcheap_initialize();
+#if !defined(CONFIG_ESP32_IRAM_HEAP) && !defined(CONFIG_ESP32_RTC_HEAP)
+#error "No suitable heap available. Enable ESP32_IRAM_HEAP or ESP32_RTC_HEAP"
 #endif
 
-  esp32_iramheap_initialize();
-}
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
 
 /****************************************************************************
  * Name: up_textheap_memalign

[incubator-nuttx] 01/05: Introduce ARCH_HAVE_EXTRA_HEAPS, this config is going to be used for chips that have multiple separate heaps. For now it's used to enable APIs to initialize the different heaps during the start sequence but can be extended for other purposes that manage those heaps.

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0a4982a80e73feb69f8c8f7e759d3f7c64b3fbff
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Fri Jun 25 15:07:23 2021 +0100

    Introduce ARCH_HAVE_EXTRA_HEAPS, this config is going to be used for
    chips that have multiple separate heaps.
    For now it's used to enable APIs to initialize the different heaps
    during the start sequence but can be extended for other purposes that
    manage those heaps.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 arch/Kconfig          | 12 ++++++++++--
 include/nuttx/arch.h  | 12 ++++++------
 sched/init/nx_start.c |  6 ++++--
 3 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 5b11791..7d71aba 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -259,9 +259,17 @@ config ARCH_NEED_ADDRENV_MAPPING
 	bool
 	default n
 
+config ARCH_HAVE_EXTRA_HEAPS
+	bool
+	default n
+	---help---
+		Special memory regions used as separate heaps
+
 config ARCH_HAVE_TEXT_HEAP
-	bool "Special memory region for dynamic code loading"
+	bool
 	default n
+	---help---
+		Special memory region for dynamic code loading
 
 config ARCH_HAVE_MULTICPU
 	bool
@@ -372,7 +380,7 @@ config ARCH_USE_MPU
 		selection will always be forced.
 
 config ARCH_USE_TEXT_HEAP
-	bool "Enable separate text heap for dynamic code loading"
+	bool "Enable separate text allocation for dynamic code loading"
 	default n
 	depends on ARCH_HAVE_TEXT_HEAP
 	---help---
diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h
index 391eb8c..517ec3f 100644
--- a/include/nuttx/arch.h
+++ b/include/nuttx/arch.h
@@ -754,22 +754,22 @@ uintptr_t pgalloc(uintptr_t brkaddr, unsigned int npages);
 #endif
 
 /****************************************************************************
- * Name: up_textheap_init
+ * Name: up_extraheaps_init
  *
  * Description:
- *   Initialize the text heap.
+ *   Initialize any extra heap.
  *
  ****************************************************************************/
 
-#if defined(CONFIG_ARCH_USE_TEXT_HEAP)
-void up_textheap_init(void);
+#if defined(CONFIG_ARCH_HAVE_EXTRA_HEAPS)
+void up_extraheaps_init(void);
 #endif
 
 /****************************************************************************
  * Name: up_textheap_memalign
  *
  * Description:
- *   Allocate memory from the text heap with the specified alignment.
+ *   Allocate memory for text sections with the specified alignment.
  *
  ****************************************************************************/
 
@@ -781,7 +781,7 @@ FAR void *up_textheap_memalign(size_t align, size_t size);
  * Name: up_textheap_free
  *
  * Description:
- *   Free memory from the text heap.
+ *   Free memory allocated for text sections.
  *
  ****************************************************************************/
 
diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c
index d6b86f4..6361695 100644
--- a/sched/init/nx_start.c
+++ b/sched/init/nx_start.c
@@ -572,8 +572,10 @@ void nx_start(void)
     }
 #endif
 
-#ifdef CONFIG_ARCH_USE_TEXT_HEAP
-  up_textheap_init();
+#ifdef CONFIG_ARCH_HAVE_EXTRA_HEAPS
+  /* Initialize any extra heap. */
+
+  up_extraheaps_init();
 #endif
 
 #ifdef CONFIG_MM_IOB

[incubator-nuttx] 03/05: arch/risc-v/esp32c3: Remove the up_textheap_init function since it's not needed anymore.

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit add18b9592ce235a4a8045779fc97375e2cb6985
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Fri Jun 25 15:13:06 2021 +0100

    arch/risc-v/esp32c3: Remove the up_textheap_init function since it's not
    needed anymore.
    
    Implement the up_extraheaps_init function to initialize all separate
    heaps.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 arch/risc-v/src/esp32c3/Kconfig                    |  1 +
 arch/risc-v/src/esp32c3/Make.defs                  |  4 ++
 .../{esp32c3_textheap.c => esp32c3_extraheaps.c}   | 77 ++--------------------
 arch/risc-v/src/esp32c3/esp32c3_textheap.c         | 13 ----
 4 files changed, 12 insertions(+), 83 deletions(-)

diff --git a/arch/risc-v/src/esp32c3/Kconfig b/arch/risc-v/src/esp32c3/Kconfig
index e12fdcd..45c9713 100644
--- a/arch/risc-v/src/esp32c3/Kconfig
+++ b/arch/risc-v/src/esp32c3/Kconfig
@@ -159,6 +159,7 @@ config ESP32C3_DISABLE_STDC_ATOMIC
 
 config ESP32C3_RTC_HEAP
 	bool "Use the RTC memory as a separate heap"
+	select ARCH_HAVE_EXTRA_HEAPS
 	default n
 
 menu "ESP32-C3 Peripheral Support"
diff --git a/arch/risc-v/src/esp32c3/Make.defs b/arch/risc-v/src/esp32c3/Make.defs
index aea0f6c..bd62279 100644
--- a/arch/risc-v/src/esp32c3/Make.defs
+++ b/arch/risc-v/src/esp32c3/Make.defs
@@ -160,6 +160,10 @@ CHIP_CSRCS += esp32c3_efuse_table.c
 CHIP_CSRCS += esp32c3_efuse_lowerhalf.c
 endif
 
+ifeq ($(CONFIG_ARCH_HAVE_EXTRA_HEAPS),y)
+CHIP_CSRCS += esp32c3_extraheaps.c
+endif
+
 ifeq ($(CONFIG_ARCH_USE_TEXT_HEAP),y)
 CHIP_CSRCS += esp32c3_textheap.c
 endif
diff --git a/arch/risc-v/src/esp32c3/esp32c3_textheap.c b/arch/risc-v/src/esp32c3/esp32c3_extraheaps.c
similarity index 53%
copy from arch/risc-v/src/esp32c3/esp32c3_textheap.c
copy to arch/risc-v/src/esp32c3/esp32c3_extraheaps.c
index fbb94bc..beb6b96 100644
--- a/arch/risc-v/src/esp32c3/esp32c3_textheap.c
+++ b/arch/risc-v/src/esp32c3/esp32c3_extraheaps.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * arch/risc-v/src/esp32c3/esp32c3_textheap.c
+ * arch/risc-v/src/esp32c3/esp32c3_extraheaps.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -40,86 +40,23 @@
 #endif
 
 /****************************************************************************
- * Pre-processor Definitions
- ****************************************************************************/
-
-#define D_I_BUS_OFFSET  0x700000
-
-/****************************************************************************
  * Public Functions
  ****************************************************************************/
 
 /****************************************************************************
- * Name: up_textheap_init()
- ****************************************************************************/
-
-void up_textheap_init()
-{
-#ifdef CONFIG_ESP32C3_RTC_HEAP
-  /* Initialize the RTC heap */
-
-  esp32c3_rtcheap_initialize();
-#endif
-}
-
-/****************************************************************************
- * Name: up_textheap_memalign()
+ * Name: up_extraheaps_init
  *
  * Description:
- *   Allocate memory for module text with the specified alignment.
+ *   Initialize any extra heap.
  *
  ****************************************************************************/
 
-FAR void *up_textheap_memalign(size_t align, size_t size)
+void up_extraheaps_init()
 {
-  FAR void *ret = NULL;
-
-  /* Prioritise allocating from RTC. If that fails, allocate from the
-   * main heap.
-   */
-
 #ifdef CONFIG_ESP32C3_RTC_HEAP
-  ret = esp32c3_rtcheap_memalign(align, size);
-#endif
-
-  if (ret == NULL)
-    {
-      ret = kmm_memalign(align, size);
-      if (ret)
-        {
-          /* kmm_memalign buffer is at the Data bus offset.  Adjust it so we
-           * can access it from the Instruction bus.
-           */
-
-          ret += D_I_BUS_OFFSET;
-        }
-    }
-
-  return ret;
-}
-
-/****************************************************************************
- * Name: up_textheap_free()
- *
- * Description:
- *   Free memory for module text.
- *
- ****************************************************************************/
+  /* Initialize the RTC heap */
 
-void up_textheap_free(FAR void *p)
-{
-  if (p)
-    {
-#ifdef CONFIG_ESP32C3_RTC_HEAP
-      if (esp32c3_ptr_rtc(p))
-        {
-          esp32c3_rtcheap_free(p);
-        }
-      else
+  esp32c3_rtcheap_initialize();
 #endif
-        {
-          p -= D_I_BUS_OFFSET;
-          kmm_free(p);
-        }
-    }
 }
+
diff --git a/arch/risc-v/src/esp32c3/esp32c3_textheap.c b/arch/risc-v/src/esp32c3/esp32c3_textheap.c
index fbb94bc..2bc65bf 100644
--- a/arch/risc-v/src/esp32c3/esp32c3_textheap.c
+++ b/arch/risc-v/src/esp32c3/esp32c3_textheap.c
@@ -50,19 +50,6 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: up_textheap_init()
- ****************************************************************************/
-
-void up_textheap_init()
-{
-#ifdef CONFIG_ESP32C3_RTC_HEAP
-  /* Initialize the RTC heap */
-
-  esp32c3_rtcheap_initialize();
-#endif
-}
-
-/****************************************************************************
  * Name: up_textheap_memalign()
  *
  * Description: