apache / apache/nuttx

[BUG] Cannot enable separate IRAM heap and SMP at the same time

Open
#15,692 7 comments 0 reactions 0 assignees View on GitHub
Arch: xtensa Area: Kernel OS: Linux Type: Bug
Dominant language
C
Stars
4k
Forks
1.7k
Avg merge
1d 17h
Merged PRs (30d)
237

Description

### Description / Steps to reproduce the issue

When enabling ESP32_IRAM_HEAP on the default esp32-devkitc:smp configuration, the resulting build cannot start.

Serial output:
```
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3ffb40e0,len:1420
ho 0 tail 12 room 4
load:0x40080000,len:22760
entry 0x40082884
*** Booting NuttX ***
dram: lma 0x00001020 vma 0x3ffb40e0 len 0x58c (1420)
iram: lma 0x000015b4 vma 0x40080000 len 0x58e8 (22760)
padd: lma 0x00006ea8 vma 0x00000000 len 0x9150 (37200)
imap: lma 0x00010000 vma 0x400e0000 len 0x1abf8 (109560)
padd: lma 0x0002ac00 vma 0x00000000 len 0x5418 (21528)
dmap: lma 0x00030020 vma 0x3f400020 len 0x96c4 (38596)
total segments stored 6
[CPU0] xtensa_user_panic: User Exception: EXCCAUSE=0003 task: CPU0 IDLE
[CPU0] dump_assert_info: Current Version: NuttX 12.7.0 5d8cdeae-dirty Jan 25 2025 13:46:53 xtensa
[CPU0] dump_assert_info: Assertion failed user panic: at file: :0 task(CPU0): CPU0 IDLE process: Kernel 0x400e1d64
[CPU0] up_dump_register: PC: 400fa1a7 PS: 00060930
[CPU0] up_dump_register: A0: 800e44d4 A1: 3ffb0b20 A2: 400858e8 A3: 00000000
[CPU0] up_dump_register: A4: 00000001 A5: fffffffc A6: 00000031 A7: 00000000
[CPU0] up_dump_register: A8: 00000000 A9: 3ffb0b00 A10: 00000000 A11: 00000000
[CPU0] up_dump_register: A12: 00060720 A13: 00007fff A14: 00a0a000 A15: b0000000
[CPU0] up_dump_register: SAR: 00000020 CAUSE: 00000003 VADDR: 400858e8
[CPU0] up_dump_register: LBEG: 400e5934 LEND: 400e5942 LCNT: 00000000
[CPU0] dump_stacks: ERROR: Stack pointer is not within the stack
[CPU0] dump_stack: IRQ Stack:
[CPU0] dump_stack: base: 0x3ffb1cec
[CPU0] dump_stack: size: 00002048
[CPU0] stack_dump: 0x3ffb1cfc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1d1c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1d3c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1d5c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1d7c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1d9c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1dbc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1ddc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1dfc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1e1c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1e3c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1e5c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1e7c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1e9c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1ebc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1edc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1efc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1f1c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1f3c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1f5c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1f7c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1f9c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1fbc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1fdc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb1ffc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb201c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb203c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb205c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb207c: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb209c: 00000109 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb20bc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb20dc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb20fc: 00000000 00000009 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb211c: 00000000 00000009 00000000 00000000 00000130 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb213c: 800f8df0 3ffb21cc 3ffb220c 3f402108 32313330 33666662 00000000 00000000
[CPU0] stack_dump: 0x3ffb215c: 00000109 3ffb21cc 3f4096bc 3ffb21ec 00000030 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb217c: 00000060 3ffb22dc 3f402138 3ffb22fc 32303438 00000008 00000000 00004210
[CPU0] stack_dump: 0x3ffb219c: 0000005f 3ffb220c 3f4096bc 3ffb222c 3ffb21ec 3ffb21cc 00000008 00000000
[CPU0] stack_dump: 0x3ffb21bc: 800f1758 3ffb220c 00000007 3f402108 3ffb22fc 3ffb22dc 00000008 3ffb22dc
[CPU0] stack_dump: 0x3ffb21dc: 00000008 00000000 3f40220b 3ffb235c 3ffb22fc 3ffb22dc 00000008 00000000
[CPU0] stack_dump: 0x3ffb21fc: 800f177c 3ffb228c 00000001 3f402108 00000067 400f9b38 400f9b64 400f9b08
[CPU0] stack_dump: 0x3ffb221c: 30203830 30303030 20373630 66303034 38336239 30303420 36623966 30342034
[CPU0] stack_dump: 0x3ffb223c: 30323433 200a3433 30333033 30333033 33303220 33363337 36362030 30333033
[CPU0] stack_dump: 0x3ffb225c: 00000000 0000000a 5f706d75 63617473 3ffb228c 3ffb231c 00000008 0000000b
[CPU0] stack_dump: 0x3ffb227c: 80084fe8 3ffb22cc 00000001 3f402108 3ffb22fc 3ffb22dc 00000008 6b636174
[CPU0] stack_dump: 0x3ffb229c: 3ffb22fc 3ffb22dc 00000008 20746f6e 3ffb22fc 3ffb22dc 00000008 00000000
[CPU0] stack_dump: 0x3ffb22bc: 80085184 3ffb231c 3ffb229c 3ffb24ec 3ffb22fc 3ffb22dc 00000008 00000009
[CPU0] stack_dump: 0x3ffb22dc: 3ffb233c 3ffb231c 3f4023d3 3ffb22bc 80085184 3ffb231c 00000008 00000009
[CPU0] stack_dump: 0x3ffb22fc: 3f4023d3 3ffb22dc 3ffb233c 3ffb231c 800851f5 3ffb235c 3f40220c 00000000
[CPU0] stack_dump: 0x3ffb231c: 3ffb233c 3ffb231c 800851f5 3ffb235c 3f40220c 00000000 00000008 3ffb234c
[CPU0] stack_dump: 0x3ffb233c: 3ffb234c 00000800 00000008 0001a594 800854ac 3ffb237c 3ffb0c00 00000000
[CPU0] stack_dump: 0x3ffb235c: 3ffb1cec 00000800 000007f0 3f4023de 80084d54 3ffb23ac 3f40165d 3ffb0c00
[CPU0] stack_dump: 0x3ffb237c: 00000000 00000000 00000000 3ffb0c00 00000000 00000000 00000001 3ffb1cec
[CPU0] stack_dump: 0x3ffb239c: 80084c76 3ffb24ac 00000003 3ffb0a48 00000000 3ffb0cac 3f402215 400e1d64
[CPU0] stack_dump: 0x3ffb23bc: 7474754e 63690058 7355203a 45207265 70656378 6e6f0074 5845203a 55414343
[CPU0] stack_dump: 0x3ffb23dc: 303d4553 20333030 6b736174 5043203a 00000000 2e323100 00302e37 00000000
[CPU0] stack_dump: 0x3ffb23fc: 3ffb241c 3ffb0b80 64354670 65646338 642d6561 79747269 6e614a20 20353220
[CPU0] stack_dump: 0x3ffb241c: 35323032 3a333120 353a3634 00000033 3ffb248c 3ffb246c 00000008 65747800
[CPU0] stack_dump: 0x3ffb243c: 0061736e 3ffb246c 00000008 0002b984 80084c76 3ffb0c00 3ffb0a48 3f400329
[CPU0] stack_dump: 0x3ffb245c: 00000000 00000000 00000008 00000000 00000002 00000000 00000000 00000000
[CPU0] stack_dump: 0x3ffb247c: 00060423 00000000 00000000 00000000 3f400329 3ffb0a48 3f4023f5 3f402215
[CPU0] stack_dump: 0x3ffb249c: 40080e50 3ffb24cc 00000003 3ffb0a48 000000ac 00060023 00000000 00000001
[CPU0] stack_dump: 0x3ffb24bc: 00040023 3ffb24ec 000000ff 3ffb0ab0 00000000 3ffb0b00 00000000 00000000
[CPU0] stack_dump: 0x3ffb24dc: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] dump_stack: User Stack:
[CPU0] dump_stack: base: 0
[CPU0] dump_stack: size: 00000000
[CPU0] stack_dump: 0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] dump_fatal_info: Dump CPU1: RUNNING
[CPU0] dump_tasks: PID GROUP CPU PRI POLICY TYPE NPX STATE EVENT SIGMASK STACKBASE STACKSIZE USED FILLED COMMAND
[CPU0] dump_tasks: ---- --- 0 --- -------- ------- --- ------- ---------- ---------------- 0x3ffb1cec 2048 2032 99.2%! irq
[CPU0] dump_tasks: ---- --- 1 --- -------- ------- --- ------- ---------- ---------------- 0x3ffb24ec 2048 2032 99.2%! irq

```

### On which OS does this issue occur?

[OS: Linux]

### What is the version of your OS?

Debian Sid (unstable)

### NuttX Version

12.7.0 (dirty due to bypassed esptool check)

### Issue Architecture

[Arch: xtensa]

### Issue Area

[Area: Kernel]

### Host information

_No response_

### Verification

- [x] I have verified before submitting the report.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.