Abhishekmishra2808 opened a new issue, #19120:
URL: https://github.com/apache/nuttx/issues/19120
### Description / Steps to reproduce the issue
### Steps to reproduce
1. Clone nuttx + nuttx-apps
2. Configure:
```bash
./tools/configure.sh esp32c3-devkit:usbconsole
Enable: `CONFIG_ELF`, `CONFIG_MODULES`, `CONFIG_FS_ROMFS`,
`CONFIG_BOARDCTL_ROMDISK`, `CONFIG_EXAMPLES_ELF`, `CONFIG_EXAMPLES_ELF_ROMFS`,
`CONFIG_EXECFUNCS_HAVE_SYMTAB`, `CONFIG_EXECFUNCS_SYSTEM_SYMTAB`,
`CONFIG_NSH_FILE_APPS`
3. Build and flash:
- make CROSSDEV=riscv32-esp-elf-
- make CROSSDEV=riscv32-esp-elf- flash ESPTOOL_PORT=/dev/ttyACM0
ESPTOOL_BINDIR=./
4. On NSH: elf
###Expected
ELF test binaries from ROMFS should run.
### Actual
riscv_exception: EXCEPTION: Instruction access fault
MCAUSE: 00000001, EPC: 3fc8b5d8, MTVAL: 3fc8b5d8
EPC is in DRAM (0x3fc8xxxx), which is not executable on ESP32-C3.
<img width="1002" height="613" alt="Image"
src="https://github.com/user-attachments/assets/1081cb0c-90db-4fe5-b410-c27aa243d2e5"
/>
### Notes
- libs/libc/elf/elf_load.c uses `lib_memalign()` (DRAM) when
`CONFIG_ARCH_USE_TEXT_HEAP` is not set.
- Current arch/risc-v/src/esp32c3/ has no `up_textheap_memalign()`.
- Legacy port has arch/risc-v/src/esp32c3-legacy/esp32c3_textheap.c
(instruction-bus alias).
- Requesting guidance whether text-heap support should be ported for ELF on
current ESP32-C3.
### On which OS does this issue occur?
[OS: Linux]
### What is the version of your OS?
WSL2 Ubuntu 24.04 (Linux 6.6.87.2-microsoft-standard-WSL2 x86_64)
### NuttX Version
master
### Issue Architecture
[Arch: risc-v]
### Issue Area
[Area: Board support]
### Host information
CONFIG_BASE_DEFCONFIG="esp32c3-devkit:usbconsole-dirty"
CONFIG_ARCH_CHIP="esp32c3" CONFIG_ARCH_BOARD="esp32c3-devkit"
CONFIG_ESPRESSIF_USBSERIAL=y
CONFIG_ELF=y
CONFIG_EXAMPLES_ELF=y
CONFIG_EXAMPLES_ELF_ROMFS=y
CONFIG_FS_ROMFS=y
CONFIG_BOARDCTL_ROMDISK=y
**Host**: Linux WSL2 x86_64 (6.6.87.2-microsoft-standard-WSL2)
Toolchain: riscv32-esp-elf-gcc (crosstool-NG esp-12.2.0_20230208) 12.2.0
Esptool: 5.3.0
HAL: sync/master.c-nuttx-20260428-23-g0eb59f7e02a
Board at test time: ESP32-C3 (QFN32), USB Serial/JTAG, 4MB flash
### Verification
- [x] I have verified before submitting the report.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]