jcmvbkbc / esp32-linux-build

xtensa linux build scripts for the esp32s3 and esp32
http://wiki.osll.ru/doku.php/etc:users:jcmvbkbc:linux-xtensa:esp32s3
99 stars 19 forks source link

boot fail (illegal instruction) #5

Open FransM opened 9 months ago

FransM commented 9 months ago

First try to boot linux on esp32-s3 (ESP32-S3-WROOM-1 N16R8) fails. build was done with rebuild-esp32s3-linux.sh

Seems to be address related. At the end of the boot it says: ptr = 0x42830000 ptr = 0x42b30000 Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Exception was unhandled. Memory dump at 0x4282fffc: d5557555 ffffffff ffffffff So apparently there is nothing at the first ptr address

full Boot log:

Rebooting... ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT) Saved PC:0x403759c8 SPIWP:0xee mode:DIO, clock div:1 load:0x3fce3810,len:0x1098 load:0x403c9700,len:0x9c8 load:0x403cc700,len:0x2ce8 entry 0x403c9880 I (70) octal_psram: vendor id : 0x0d (AP) I (70) octal_psram: dev id : 0x02 (generation 3) I (70) octal_psram: density : 0x03 (64 Mbit) I (75) octal_psram: good-die : 0x01 (Pass) I (80) octal_psram: Latency : 0x01 (Fixed) I (85) octal_psram: VCC : 0x01 (3V) I (90) octal_psram: SRF : 0x01 (Fast Refresh) I (96) octal_psram: BurstType : 0x01 (Hybrid Wrap) I (101) octal_psram: BurstLen : 0x01 (32 Byte) I (107) octal_psram: Readlatency : 0x02 (10 cycles@Fixed) I (113) octal_psram: DriveStrength: 0x00 (1/1) I (119) esp_psram: Found 8MB PSRAM device I (123) esp_psram: Speed: 80MHz I (127) cpu_start: Pro cpu up. I (130) cpu_start: Starting app cpu, entry point is 0x403752d8 I (119) cpu_start: App cpu up. I (583) esp_psram: SPI SRAM memory test OK I (591) cpu_start: Pro cpu start user code I (591) cpu_start: cpu freq: 160000000 Hz I (591) cpu_start: Application information: I (594) cpu_start: Project name: linux_boot I (599) cpu_start: App version: v5.0.1-8-gfc1671b3cd I (606) cpu_start: Compile time: Feb 21 2024 17:55:21 I (612) cpu_start: ELF file SHA256: c79414a9bc389250... I (618) cpu_start: ESP-IDF: v5.0.1-8-gfc1671b3cd I (624) cpu_start: Min chip rev: v0.0 I (628) cpu_start: Max chip rev: v0.99 I (633) cpu_start: Chip rev: v0.1 I (638) heap_init: Initializing. RAM available for dynamic allocation: I (645) heap_init: At 3FC95340 len 000543D0 (336 KiB): D/IRAM I (652) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM I (658) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM I (664) heap_init: At 600FE010 len 00001FF0 (7 KiB): RTCRAM I (671) esp_psram: Adding pool of 8192K of PSRAM memory to heap allocator I (679) spi_flash: detected chip: winbond I (683) spi_flash: flash io: dio W (687) spi_flash: Detected size(16384k) larger than the size in the binary image header(8192k). Using the size in the binary image header. I (701) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (721) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations ptr = 0x42830000 ptr = 0x42b30000 Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Exception was unhandled. Memory dump at 0x4282fffc: d5557555 ffffffff ffffffff Core 0 register dump: PC : 0x42830000 PS : 0x00060530 A0 : 0x82006131 A1 : 0x3fcea870
A2 : 0x42830000 A3 : 0x00000003 A4 : 0x00060023 A5 : 0x00000001
A6 : 0x00060623 A7 : 0x00000000 A8 : 0x803773c9 A9 : 0x3fcea820
A10 : 0x00000011 A11 : 0x3fceaa80 A12 : 0x00000001 A13 : 0x01ffffff
A14 : 0x00000000 A15 : 0x00008000 SAR : 0x00000011 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x400554b9 LEND : 0x400554dd LCOUNT : 0x8200700b

Backtrace: 0x4282fffd:0x3fcea870 0x4200612e:0x3fcea890 0x4037cdad:0x3fcea8b0

ELF file SHA256: c79414a9bc389250

Rebooting...

jcmvbkbc commented 9 months ago

build was done with rebuild-esp32s3-linux.sh

It's outdated and is likely broken by now. Please try rebuild-esp32s3-linux-wifi.sh instead.

FransM commented 9 months ago

I have rebuild with rebuild-esp32s3-linux-wifi.sh and flashed it and it works!

Seems indeed that the non wifi version is broken; maybe some code in the non-wifi version that wants to start or access the wifi core.

I'm also not sure if the non-s3 version still works. tried that first, of course on an esp32 (ESP32-WROOM-32 on a DOIT ESP32 DevKit V1 Wi-Fi Development Board ) but that was not successful. I seem to recall that failed because upon booting the system complained that there was no PSRAM

Leaving this for you to decide on closing now or keeping open until the non wifi version is fixed or removed.

jcmvbkbc commented 9 months ago

I'm also not sure if the non-s3 version still works

I've rebuilt and re-flashed it just now, works for me on the freenove esp32-wrover-dev board with 4M PSRAM.

Leaving this for you to decide on closing now or keeping open until the non wifi version is fixed or removed.

Thanks. I'll take a closer look in a few days.