Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
artdeell opened this issue Jan 25, 2025 · 4 comments
Open
1 task done

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

artdeell opened this issue Jan 25, 2025 · 4 comments
Labels
Arch: xtensa Issues related to the Xtensa architecture Area: Kernel Kernel issues OS: Linux Issues related to Linux (building system, etc) Type: Bug Something isn't working

Comments

@artdeell
Copy link

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

  • I have verified before submitting the report.
@artdeell artdeell added the Type: Bug Something isn't working label Jan 25, 2025
@github-actions github-actions bot added Arch: xtensa Issues related to the Xtensa architecture Area: Kernel Kernel issues OS: Linux Issues related to Linux (building system, etc) labels Jan 25, 2025
@acassis
Copy link
Contributor

acassis commented Jan 26, 2025

@eren-terzioglu @tmedicci @fdcavalcanti could you please take a look?

@eren-terzioglu
Copy link
Contributor

Hi,
Which version of esptool you are using? Seems you bypassed version check due to #15690 issue. esptool v4.7 might cause the issue. Please create a venv and try to flash it with required version of esptool.

@artdeell
Copy link
Author

artdeell commented Jan 27, 2025

I use esptool 4.8.x (don't remember the exact version, not home at the moment), bypassed the check to use the version installed through pipx

@artdeell
Copy link
Author

Got home, checked, esptool version used by the build process is 4.8.1
Full build log:

Create version.h
LN: platform/board to /home/maks/esp32/apps/platform/dummy
Register: hello
Register: nsh
Register: sh
Register: taskset
Register: ostest
Register: smp
CPP:  /home/maks/esp32/nuttx/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld-> /home/maks/esp32/nuttx/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.libgcc.ldCPP:  /home/maks/esp32/nuttx/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld-> /home/maks/esp32/nuttx/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlCPP:  /home/maks/esp32/nuttx/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld-> /home/maks/esp32/nuttx/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newCPP:  /home/maks/esp32/nuttx/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld-> /home/maks/esp32/nuttx/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.syscallLD: nuttx
CP: nuttx.hex
MKIMAGE: ESP32 binary
esptool.py -c esp32 elf2image --ram-only-header -fs 4MB -fm dio -ff 40m -o nuttx.bin nuttx
esptool.py v4.8.1
Creating esp32 image...
Image has only RAM segments visible. ROM segments are hidden and SHA256 digest is not appended.
Merged 1 ELF section
Successfully created esp32 image.
Generated: nuttx.bin
esptool.py -c esp32 -p /dev/ttyUSB0 -b 921600  write_flash -fs detect -fm dio -ff 40m 0x1000 nuttx.bin
esptool.py v4.8.1
Serial port /dev/ttyUSB0
Connecting......
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: d8:bc:38:fc:f2:1c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00001000 to 0x00039fff...
Compressed 231140 bytes to 110125...
Wrote 231140 bytes (110125 compressed) at 0x00001000 in 2.2 seconds (effective 837.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: xtensa Issues related to the Xtensa architecture Area: Kernel Kernel issues OS: Linux Issues related to Linux (building system, etc) Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants