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

ESP32-S3 Powercycling right after uploading a sketch using Arduino IDE and Arduino Core 2.0.4 #7165

Closed
1 task done
SuGlider opened this issue Aug 22, 2022 · 38 comments
Closed
1 task done
Assignees
Labels
Chip: ESP32-S3 Issue is related to support of ESP32-S3 Chip Resolution: HW issue Issue is in hardware.

Comments

@SuGlider
Copy link
Collaborator

SuGlider commented Aug 22, 2022

Board

ESP32-S3

Device Description

ESP32-S3-DevkitC-1 1.0

Hardware Configuration

None

Version

v2.0.4

IDE Name

Arduino IDE 1.8.15

Operating System

Windows 11

Flash frequency

QIO 80MHz

PSRAM enabled

no

Upload speed

Tried 115200 and 921600

Description

I have two, apparently equal, ESP32-S3 boards.
For one of them I can upload any sketch and it works fine right after reset.
The other one keeps reseting after uploading and I can't make it work.

BUT.... when I use IDF examples (HelloWorld and Blink RGB LED) both works fine!
So it seems that something may be wrong with Arduino second-stage bootloader or some boot configuration.

No error message even with DEBUG turned on.

IMPORTANT NOTE: it runs fine with Arduino Core 2.0.3 but fails with 2.0.4 --- REGRESSION

Sketch

// 01.Basics --> BareMinimum Arduino Example

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

Debug Message

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x43c
load:0x403c9700,len:0xbec
load:0x403cc700,len:0x2a3c
SHA-256 comparison failed:
Calculated: 3611f330726ad4edf64f62982b0568332a5800bc59425cab90be5379db92c108
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98d8
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cebce
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x43c
load:0x403c9700,len:0xbec
load:0x403cc700,len:0x2a3c
SHA-256 comparison failed:
Calculated: 3611f330726ad4edf64f62982b0568332a5800bc59425cab90be5379db92c108
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98d8
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cebce
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x43c
load:0x403c9700,len:0xbec
load:0x403cc700,len:0x2a3c
SHA-256 comparison failed:
Calculated: 3611f330726ad4edf64f62982b0568332a5800bc59425cab90be5379db92c108
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98d8
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x10 (RTCWDT_RTC_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x43c
load:0x403c9700,len:0xbec
load:0x403cc700,len:0x2a3c
SHA-256 comparison failed:
Calculated: 3611f330726ad4edf64f62982b0568332a5800bc59425cab90be5379db92c108
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98d8
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cebce
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x43c
load:0x403c9700,len:0xbec
load:0x403cc700,len:0x2a3c
SHA-256 comparison failed:
Calculated: 3611f330726ad4edf64f62982b0568332a5800bc59425cab90be5379db92c108
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98d8
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cebce
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x43c
load:0x403c9700,len:0xbec
load:0x403cc700,len:0x2a3c
SHA-256 comparison failed:
Calculated: 3611f330726ad4edf64f62982b0568332a5800bc59425cab90be5379db92c108
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98d8

Other Steps to Reproduce

As simple as that. I get TG0WDT_SYS_RST or RTCWDT_RTC_RST in the second-stage bootloader execution.

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@SuGlider SuGlider added the Status: Awaiting triage Issue is waiting for triage label Aug 22, 2022
@SuGlider
Copy link
Collaborator Author

Can it be related to #7125 ?

@SuGlider
Copy link
Collaborator Author

SuGlider commented Aug 22, 2022

The S3 that works fine has this output and doesn't reset:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x43c
load:0x403c9700,len:0xbec
load:0x403cc700,len:0x2a3c
SHA-256 comparison failed:
Calculated: 3611f330726ad4edf64f62982b0568332a5800bc59425cab90be5379db92c108
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98d8

@SuGlider
Copy link
Collaborator Author

This is the picture of the S3 that works fine:

image

@SuGlider
Copy link
Collaborator Author

This is the picture of the S3 that fails:

image

@SuGlider
Copy link
Collaborator Author

SuGlider commented Aug 22, 2022

Both seem to be exactly the same CHIP! Both have the same output when booting, but one of them keeps restating after 1st stage bootloader.

But, when I run IDF HelloWorld example.... it works perfectly well in both boards.

@VojtechBartoska VojtechBartoska added the Chip: ESP32-S3 Issue is related to support of ESP32-S3 Chip label Aug 22, 2022
@SuGlider
Copy link
Collaborator Author

Using IDF 4.4.1, I can run it on Both bards.

Log Output for the "Good board" is

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x20cc
load:0x403b6000,len:0xd1c
load:0x403ba000,len:0x3454
entry 0x403b6290
I (26) boot: ESP-IDF v4.4.1 2nd stage bootloader
I (26) boot: compile time 10:37:47
D (26) bootloader_flash: non-XMC chip detected by SFDP Read (C8), skip.
D (31) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
I (38) boot: chip revision: 0
D (41) boot.esp32s3: magic e9
D (44) boot.esp32s3: segments 03
D (48) boot.esp32s3: spi_mode 02
D (51) boot.esp32s3: spi_speed 0f
D (54) boot.esp32s3: spi_size 01
I (58) boot.esp32s3: Boot SPI Speed : 80MHz
I (63) boot.esp32s3: SPI Mode       : DIO
I (67) boot.esp32s3: SPI Flash Size : 2MB
D (72) boot: Enabling RTCWDT(9000 ms)
I (76) boot: Enabling RNG early entropy source...
D (81) bootloader_flash: mmu set paddr=00000000 count=1 size=c00 src_addr=8000 src_addr_aligned=0
D (90) boot: mapped partition table 0x8000 at 0x3c008000
D (95) flash_parts: partition table verified, 4 entries
I (101) boot: Partition Table:
I (104) boot: ## Label            Usage          Type ST Offset   Length
D (112) boot: load partition table entry 0x3c008000
D (117) boot: type=1 subtype=2
I (120) boot:  0 nvs              WiFi data        01 02 00009000 00006000
D (127) boot: load partition table entry 0x3c008020
D (132) boot: type=1 subtype=1
I (135) boot:  1 phy_init         RF data          01 01 0000f000 00001000
D (143) boot: load partition table entry 0x3c008040
D (148) boot: type=0 subtype=0
I (151) boot:  2 factory          factory app      00 00 00010000 00100000
I (159) boot: End of partition table
D (163) boot: Trying partition index -1 offs 0x10000 size 0x100000
D (169) esp_image: reading image header @ 0x10000
D (174) bootloader_flash: mmu set block paddr=0x00010000 (was 0xffffffff)
D (181) esp_image: image header: 0xe9 0x06 0x02 0x01 40375164
V (187) esp_image: loading segment header 0 at offset 0x10018
V (192) esp_image: segment data length 0x7ae0 data starts 0x10020
V (199) esp_image: segment 0 map_segment 1 segment_data_offs 0x10020 load_addr 0x3c020020
I (207) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=07ae0h ( 31456) map
D (215) esp_image: free data page_count 0x0000003f
D (220) bootloader_flash: mmu set paddr=00010000 count=1 size=7ae0 src_addr=10020 src_addr_aligned=10000
V (235) esp_image: loading segment header 1 at offset 0x17b00
D (236) bootloader_flash: mmu set block paddr=0x00010000 (was 0xffffffff)
V (242) esp_image: segment data length 0x26f8 data starts 0x17b08
V (248) esp_image: segment 1 map_segment 0 segment_data_offs 0x17b08 load_addr 0x3fc90630
I (257) esp_image: segment 1: paddr=00017b08 vaddr=3fc90630 size=026f8h (  9976) load
D (265) esp_image: free data page_count 0x0000003f
D (270) bootloader_flash: mmu set paddr=00010000 count=1 size=26f8 src_addr=17b08 src_addr_aligned=10000
V (282) esp_image: loading segment header 2 at offset 0x1a200
D (285) bootloader_flash: mmu set block paddr=0x00010000 (was 0xffffffff)
V (292) esp_image: segment data length 0x5e10 data starts 0x1a208
V (298) esp_image: segment 2 map_segment 0 segment_data_offs 0x1a208 load_addr 0x40374000
I (307) esp_image: segment 2: paddr=0001a208 vaddr=40374000 size=05e10h ( 24080) load
D (315) esp_image: free data page_count 0x0000003f
D (320) bootloader_flash: mmu set paddr=00010000 count=2 size=5e10 src_addr=1a208 src_addr_aligned=10000
V (335) esp_image: loading segment header 3 at offset 0x20018
D (335) bootloader_flash: mmu set block paddr=0x00020000 (was 0xffffffff)
V (342) esp_image: segment data length 0x173a0 data starts 0x20020
V (349) esp_image: segment 3 map_segment 1 segment_data_offs 0x20020 load_addr 0x42000020
I (357) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=173a0h ( 95136) map
D (365) esp_image: free data page_count 0x0000003f
D (370) bootloader_flash: mmu set paddr=00020000 count=2 size=173a0 src_addr=20020 src_addr_aligned=20000
V (397) esp_image: loading segment header 4 at offset 0x373c0
D (397) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
V (398) esp_image: segment data length 0x6814 data starts 0x373c8
V (404) esp_image: segment 4 map_segment 0 segment_data_offs 0x373c8 load_addr 0x40379e10
I (413) esp_image: segment 4: paddr=000373c8 vaddr=40379e10 size=06814h ( 26644) load
D (421) esp_image: free data page_count 0x0000003f
D (426) bootloader_flash: mmu set paddr=00030000 count=1 size=6814 src_addr=373c8 src_addr_aligned=30000
V (441) esp_image: loading segment header 5 at offset 0x3dbdc
D (442) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
V (448) esp_image: segment data length 0x10 data starts 0x3dbe4
V (454) esp_image: segment 5 map_segment 0 segment_data_offs 0x3dbe4 load_addr 0x50000000
I (462) esp_image: segment 5: paddr=0003dbe4 vaddr=50000000 size=00010h (    16) load
D (471) esp_image: free data page_count 0x0000003f
D (476) bootloader_flash: mmu set paddr=00030000 count=1 size=10 src_addr=3dbe4 src_addr_aligned=30000
V (485) esp_image: image start 0x00010000 end of last section 0x0003dbf4
D (492) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
D (499) boot: Calculated hash: d0578e0e2f955caf68f5088b1de5ac7e05fd9c0d82ec2b9e19b813c19ffe6569
I (513) boot: Loaded app from partition at offset 0x10000
I (514) boot: Disabling RNG early entropy source...
D (519) boot: Mapping segment 0 as DROM
D (523) boot: Mapping segment 3 as IROM
D (527) boot: calling set_cache_and_start_app
D (531) boot: configure drom and irom and start
V (536) boot: d mmu set paddr=00010000 vaddr=3c020000 size=31456 n=1
V (542) boot: rc=0
V (545) boot: i mmu set paddr=00020000 vaddr=42000000 size=95136 n=2
V (551) boot: rc=0
D (553) boot: start: 0x40375164
I (567) cpu_start: Pro cpu up.
I (568) cpu_start: Starting app cpu, entry point is 0x403750bc
I (0) cpu_start: App cpu up.
I (581) cpu_start: Pro cpu start user code
I (581) cpu_start: cpu freq: 160000000
I (581) cpu_start: Application information:
I (584) cpu_start: Project name:     hello_world
I (589) cpu_start: App version:      1
I (593) cpu_start: Compile time:     Aug 22 2022 10:37:31
I (600) cpu_start: ELF file SHA256:  71c5a3bff93e6ff3...
I (606) cpu_start: ESP-IDF:          v4.4.1
I (610) heap_init: Initializing. RAM available for dynamic allocation:
I (618) heap_init: At 3FC93718 len 0004C8E8 (306 KiB): D/IRAM
I (624) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
I (631) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (637) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM
I (644) spi_flash: detected chip: gd
I (648) spi_flash: flash io: dio
W (651) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (665) sleep: Configure to isolate all GPIO pins in sleep state
I (671) sleep: Enable automatic switching of GPIO sleep configuration[⸮

@SuGlider
Copy link
Collaborator Author

IDF 4.4.1 Log Output for the "BAD board" is

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x20cc
load:0x403b6000,len:0xd1c
load:0x403ba000,len:0x3454
entry 0x403b6290
I (26) boot: ESP-IDF v4.4.1 2nd stage bootloader
I (26) boot: compile time 10:37:47
D (26) bootloader_flash: non-XMC chip detected by SFDP Read (C8), skip.
D (31) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
I (38) boot: chip revision: 0
D (43) boot.esp32s3: magic e9
D (44) boot.esp32s3: segments 03
D (48) boot.esp32s3: spi_mode 02
D (51) boot.esp32s3: spi_speed 0f
D (54) boot.esp32s3: spi_size 01
I (58) boot.esp32s3: Boot SPI Speed : 80MHz
I (63) boot.esp32s3: SPI Mode       : DIO
I (67) boot.esp32s3: SPI Flash Size : 2MB
D (72) boot: Enabling RTCWDT(9000 ms)
I (76) boot: Enabling RNG early entropy source...
D (81) bootloader_flash: mmu set paddr=00000000 count=1 size=c00 src_addr=8000 src_addr_aligned=0
D (90) boot: mapped partition table 0x8000 at 0x3c008000
D (95) flash_parts: partition table verified, 4 entries
I (101) boot: Partition Table:
I (104) boot: ## Label            Usage          Type ST Offset   Length
D (112) boot: load partition table entry 0x3c008000
D (117) boot: type=1 subtype=2
I (120) boot:  0 nvs              WiFi data        01 02 00009000 00006000
D (127) boot: load partition table entry 0x3c008020
D (132) boot: type=1 subtype=1
I (135) boot:  1 phy_init         RF data          01 01 0000f000 00001000
D (143) boot: load partition table entry 0x3c008040
D (148) boot: type=0 subtype=0
I (151) boot:  2 factory          factory app      00 00 00010000 00100000
I (159) boot: End of partition table
D (163) boot: Trying partition index -1 offs 0x10000 size 0x100000
D (169) esp_image: reading image header @ 0x10000
D (174) bootloader_flash: mmu set block paddr=0x00010000 (was 0xffffffff)
D (181) esp_image: image header: 0xe9 0x06 0x02 0x01 40375164
V (187) esp_image: loading segment header 0 at offset 0x10018
V (192) esp_image: segment data length 0x7ae0 data starts 0x10020
V (199) esp_image: segment 0 map_segment 1 segment_data_offs 0x10020 load_addr 0x3c020020
I (207) esp_image: segment 0: paddr=00010020 vaddr=3c020020 size=07ae0h ( 31456) map
D (215) esp_image: free data page_count 0x0000003f
D (220) bootloader_flash: mmu set paddr=00010000 count=1 size=7ae0 src_addr=10020 src_addr_aligned=10000
V (235) esp_image: loading segment header 1 at offset 0x17b00
D (236) bootloader_flash: mmu set block paddr=0x00010000 (was 0xffffffff)
V (242) esp_image: segment data length 0x26f8 data starts 0x17b08
V (248) esp_image: segment 1 map_segment 0 segment_data_offs 0x17b08 load_addr 0x3fc90630
I (257) esp_image: segment 1: paddr=00017b08 vaddr=3fc90630 size=026f8h (  9976) load
D (265) esp_image: free data page_count 0x0000003f
D (270) bootloader_flash: mmu set paddr=00010000 count=1 size=26f8 src_addr=17b08 src_addr_aligned=10000
V (282) esp_image: loading segment header 2 at offset 0x1a200
D (285) bootloader_flash: mmu set block paddr=0x00010000 (was 0xffffffff)
V (292) esp_image: segment data length 0x5e10 data starts 0x1a208
V (298) esp_image: segment 2 map_segment 0 segment_data_offs 0x1a208 load_addr 0x40374000
I (307) esp_image: segment 2: paddr=0001a208 vaddr=40374000 size=05e10h ( 24080) load
D (315) esp_image: free data page_count 0x0000003f
D (320) bootloader_flash: mmu set paddr=00010000 count=2 size=5e10 src_addr=1a208 src_addr_aligned=10000
V (335) esp_image: loading segment header 3 at offset 0x20018
D (335) bootloader_flash: mmu set block paddr=0x00020000 (was 0xffffffff)
V (342) esp_image: segment data length 0x173a0 data starts 0x20020
V (349) esp_image: segment 3 map_segment 1 segment_data_offs 0x20020 load_addr 0x42000020
I (357) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=173a0h ( 95136) map
D (365) esp_image: free data page_count 0x0000003f
D (370) bootloader_flash: mmu set paddr=00020000 count=2 size=173a0 src_addr=20020 src_addr_aligned=20000
V (397) esp_image: loading segment header 4 at offset 0x373c0
D (397) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
V (398) esp_image: segment data length 0x6814 data starts 0x373c8
V (404) esp_image: segment 4 map_segment 0 segment_data_offs 0x373c8 load_addr 0x40379e10
I (413) esp_image: segment 4: paddr=000373c8 vaddr=40379e10 size=06814h ( 26644) load
D (421) esp_image: free data page_count 0x0000003f
D (426) bootloader_flash: mmu set paddr=00030000 count=1 size=6814 src_addr=373c8 src_addr_aligned=30000
V (441) esp_image: loading segment header 5 at offset 0x3dbdc
D (442) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
V (448) esp_image: segment data length 0x10 data starts 0x3dbe4
V (454) esp_image: segment 5 map_segment 0 segment_data_offs 0x3dbe4 load_addr 0x50000000
I (462) esp_image: segment 5: paddr=0003dbe4 vaddr=50000000 size=00010h (    16) load
D (471) esp_image: free data page_count 0x0000003f
D (476) bootloader_flash: mmu set paddr=00030000 count=1 size=10 src_addr=3dbe4 src_addr_aligned=30000
V (485) esp_image: image start 0x00010000 end of last section 0x0003dbf4
D (492) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
D (499) boot: Calculated hash: d0578e0e2f955caf68f5088b1de5ac7e05fd9c0d82ec2b9e19b813c19ffe6569
I (513) boot: Loaded app from partition at offset 0x10000
I (514) boot: Disabling RNG early entropy source...
D (519) boot: Mapping segment 0 as DROM
D (523) boot: Mapping segment 3 as IROM
D (527) boot: calling set_cache_and_start_app
D (531) boot: configure drom and irom and start
V (536) boot: d mmu set paddr=00010000 vaddr=3c020000 size=31456 n=1
V (542) boot: rc=0
V (545) boot: i mmu set paddr=00020000 vaddr=42000000 size=95136 n=2
V (551) boot: rc=0
D (553) boot: start: 0x40375164
I (567) cpu_start: Pro cpu up.
I (568) cpu_start: Starting app cpu, entry point is 0x403750bc
I (0) cpu_start: App cpu up.
I (581) cpu_start: Pro cpu start user code
I (581) cpu_start: cpu freq: 160000000
I (581) cpu_start: Application information:
I (584) cpu_start: Project name:     hello_world
I (589) cpu_start: App version:      1
I (593) cpu_start: Compile time:     Aug 22 2022 10:37:31
I (600) cpu_start: ELF file SHA256:  71c5a3bff93e6ff3...
I (605) cpu_start: ESP-IDF:          v4.4.1
I (610) heap_init: Initializing. RAM available for dynamic allocation:
I (618) heap_init: At 3FC93718 len 0004C8E8 (306 KiB): D/IRAM
I (624) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM
I (631) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (637) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM
I (644) spi_flash: detected chip: gd
I (648) spi_flash: flash io: dio
W (651) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (665) sleep: Configure to isolate all GPIO pins in sleep state
I (671) sleep: Enable automatic switching of GPIO sleep configuration[⸮

@SuGlider
Copy link
Collaborator Author

Comparing IDF output for both boards.... there is no difference. Both work fine under IDF.
But with Arduino.... it doesn't.

@SuGlider
Copy link
Collaborator Author

Testing it with all possible ESP32-S3 Arduino Cores (upload speed minimum at 115200):

  • Core 2.0.3: Works FINE!!!!
  • Core 2.0.4: Fails as described in the issue

@me-no-dev --- This seems to be a REGRESSION.

@SuGlider SuGlider added the Type: Regression Result of unforeseen consequences of a previous change label Aug 22, 2022
@SuGlider SuGlider changed the title ESP32-S3 Powercycling right after uploading a sketch using Arduino IDE ESP32-S3 Powercycling right after uploading a sketch using Arduino IDE and Arduino Core 2.0.4 Aug 22, 2022
@SuGlider SuGlider added this to the 2.0.5 milestone Aug 22, 2022
@Jason2866
Copy link
Collaborator

@SuGlider Have you tried PlatformIO? Install is done in a few minutes if you have not used before. If both devices runs with Platformio and core 2.0.4. it is probably Arduino IDE.

@SuGlider
Copy link
Collaborator Author

Hi @Jason2866 - Thanks for the suggestion.
I just created an empty project in PIO using version 5.1.0
I set it to use the default esp32-s3-devkitc-1 board and then just build/upload/monitor the project.

Same issue. Power Cycle - reseting.

platformio.ini

[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200

@SuGlider
Copy link
Collaborator Author

From the Platform.txt in the PIO environment I can tell that it is using Core 2.0.4 to build it.

@Jason2866
Copy link
Collaborator

Can you please try:

[env:esp32-s3-devkitc-1]
platform  = https://github.com/Jason2866/platform-espressif32.git
board = esp32-s3-devkitc-1
framework = arduino
monitor_speed = 115200

i did some changes in Platformio to use latest esptool v4.2.1 and some small fixes which are not in the official Platformio espressif32 framework.
The changes can affect the S3

@SuGlider
Copy link
Collaborator Author

@Jason2866 - Same problem... power cycle.

PIO Terminal Ouput:

Processing esp32-s3-devkitc-1 (platform: https://github.com/Jason2866/platform-espressif32.git; board: esp32-s3-devkitc-1; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------Platform Manager: Installing git+https://github.com/Jason2866/platform-espressif32.git
git version 2.32.0.windows.2
Cloning into 'C:\Users\esp-user\.platformio\.cache\tmp\pkg-installing-7ifqokh2'...
remote: Enumerating objects: 572, done.
remote: Counting objects: 100% (572/572), done.
remote: Compressing objects: 100% (431/431), done.
remote: Total 572 (delta 253), reused 340 (delta 119), pack-reused 0
Receiving objects: 100% (572/572), 448.82 KiB | 764.00 KiB/s, done.
Resolving deltas: 100% (253/253), done.
Platform Manager: espressif32@2.0.4+1.sha.28cf70e has been installed!
Tool Manager: Installing https://github.com/tasmota/arduino-esp32/releases/download/2.0.4.1/framework-arduinoespressif32.tar.gz
Unpacking  [####################################]  100%
Tool Manager: framework-arduinoespressif32@2.0.4 has been installed!
Tool Manager: Installing espressif/toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch3
Unpacking  [####################################]  100%
Tool Manager: toolchain-xtensa-esp32s3@8.4.0+2021r2-patch3 has been installed!
Tool Manager: Installing espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch3
Unpacking  [####################################]  100%
Tool Manager: toolchain-riscv32-esp@8.4.0+2021r2-patch3 has been installed!
Tool Manager: Installing https://github.com/tasmota/esptool/releases/download/v4.2.1/esptool-4.2.1.zip
Unpacking  [####################################]  100%
Tool Manager: tool-esptoolpy@1.40201.220809 has been installed!
Tool Manager: Installing platformio/tool-mkspiffs @ ~2.230.0
Unpacking  [####################################]  100%
Tool Manager: tool-mkspiffs@2.230.0 has been installed!
Tool Manager: Installing platformio/tool-mklittlefs @ ~1.203.0
Unpacking  [####################################]  100%
Tool Manager: tool-mklittlefs@1.203.210628 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-s3-devkitc-1.html
PLATFORM: Espressif 32 (2.0.4+1.sha.28cf70e) > Espressif ESP32-S3-DevKitC-1-N8 (8 MB QD, No PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (esp-builtin) On-board (esp-builtin) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 @ 2.0.4
 - tool-esptoolpy @ 1.40201.220809 (4.2.1)
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch3 
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 32 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\esp32-s3-devkitc-1\src\main.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\Esp.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\FirmwareMSC.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\FunctionalInterrupt.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\HWCDC.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\IPAddress.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\IPv6Address.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\MD5Builder.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\Print.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\Stream.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\StreamString.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\Tone.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\USB.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\USBCDC.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\USBMSC.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\WMath.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\WString.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\base64.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\cbuf.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-adc.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-bt.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-cpu.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-dac.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-gpio.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-i2c-slave.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-i2c.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-ledc.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-matrix.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-misc.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-psram.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-rgb-led.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-rmt.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-sigmadelta.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-spi.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-time.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-timer.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-tinyusb.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-touch.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\esp32-hal-uart.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\firmware_msc_fat.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\libb64\cdecode.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\libb64\cencode.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\main.cpp.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\stdlib_noniso.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\wiring_pulse.c.o
Compiling .pio\build\esp32-s3-devkitc-1\FrameworkArduino\wiring_shift.c.o
Archiving .pio\build\esp32-s3-devkitc-1\libFrameworkArduino.a
Indexing .pio\build\esp32-s3-devkitc-1\libFrameworkArduino.a
Linking .pio\build\esp32-s3-devkitc-1\firmware.elf
Retrieving maximum program size .pio\build\esp32-s3-devkitc-1\firmware.elf
Checking size .pio\build\esp32-s3-devkitc-1\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   2.9% (used 9664 bytes from 327680 bytes)
Flash: [          ]   3.3% (used 110457 bytes from 3342336 bytes)
Building .pio\build\esp32-s3-devkitc-1\firmware.bin
esptool.py v4.2.1
Creating esp32s3 image...
Merged 2 ELF sections
Successfully created esp32s3 image.


Processing esp32-s3-devkitc-1 (platform: https://github.com/Jason2866/platform-espressif32.git; board: esp32-s3-devkitc-1; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Tool Manager: Installing platformio/tool-mkfatfs @ ~2.0.0
Unpacking  [####################################]  100%
Tool Manager: tool-mkfatfs@2.0.1 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-s3-devkitc-1.html
PLATFORM: Espressif 32 (2.0.4+1.sha.28cf70e) > Espressif ESP32-S3-DevKitC-1-N8 (8 MB QD, No PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (esp-builtin) On-board (esp-builtin) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 2.0.4 
 - tool-esptoolpy @ 1.40201.220809 (4.2.1)
 - tool-mkfatfs @ 2.0.1
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch3
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 32 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio\build\esp32-s3-devkitc-1\firmware.elf
Checking size .pio\build\esp32-s3-devkitc-1\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   2.9% (used 9664 bytes from 327680 bytes)
Flash: [          ]   3.3% (used 110457 bytes from 3342336 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-builtin, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM14
Uploading .pio\build\esp32-s3-devkitc-1\firmware.bin
esptool.py v4.2.1
Serial port COM14
Connecting....
Chip is ESP32-S3
Features: WiFi, BLE
Crystal is 40MHz
MAC: 7c:df:a1:e0:10:18
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00003fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x0002cfff...
Flash params set to 0x023f
Compressed 13680 bytes to 9516...
Writing at 0x00000000... (100 %)
Wrote 13680 bytes (9516 compressed) at 0x00000000 in 0.4 seconds (effective 255.9 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 129...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (129 compressed) at 0x00008000 in 0.1 seconds (effective 432.4 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 620.5 kbit/s)...
Hash of data verified.
Compressed 118416 bytes to 74853...
Writing at 0x00010000... (20 %)
Writing at 0x00017b4f... (40 %)
Writing at 0x0001d7aa... (60 %)
Writing at 0x00024d28... (80 %)
Writing at 0x00029f59... (100 %)
Wrote 118416 bytes (74853 compressed) at 0x00010000 in 2.0 seconds (effective 463.3 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
=================================================================== [SUCCESS] Took 10.12 seconds ===================================================================
--- Terminal on COM14 | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x118
load:0x403c9700,len:0xba4
load:0x403cc700,len:0x287c
SHA-256 comparison failed:
Calculated: 5915a3eb601e6348eb01a09185a40349448a38ad4ee23325591d0f91b300e34c
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98c0
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cea10
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x118
load:0x403c9700,len:0xba4
load:0x403cc700,len:0x287c
SHA-256 comparison failed:
Calculated: 5915a3eb601e6348eb01a09185a40349448a38ad4ee23325591d0f91b300e34c
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98c0
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cea0e
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x118
load:0x403c9700,len:0xba4
load:0x403cc700,len:0x287c
SHA-256 comparison failed:
Calculated: 5915a3eb601e6348eb01a09185a40349448a38ad4ee23325591d0f91b300e34c
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98c0
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x10 (RTCWDT_RTC_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x118
load:0x403c9700,len:0xba4
load:0x403cc700,len:0x287c
SHA-256 comparison failed:
Calculated: 5915a3eb601e6348eb01a09185a40349448a38ad4ee23325591d0f91b300e34c
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98c0
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cea0e
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x118
load:0x403c9700,len:0xba4
load:0x403cc700,len:0x287c
SHA-256 comparison failed:
Calculated: 5915a3eb601e6348eb01a09185a40349448a38ad4ee23325591d0f91b300e34c
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98c0
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cea0e
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x118
load:0x403c9700,len:0xba4
load:0x403cc700,len:0x287c
SHA-256 comparison failed:
Calculated: 5915a3eb601e6348eb01a09185a40349448a38ad4ee23325591d0f91b300e34c
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98c0
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x10 (RTCWDT_RTC_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x118
load:0x403c9700,len:0xba4
load:0x403cc700,len:0x287c
SHA-256 comparison failed:
Calculated: 5915a3eb601e6348eb01a09185a40349448a38ad4ee23325591d0f91b300e34c
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98c0
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cea0e
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x118
load:0x403c9700,len:0xba4
load:0x403cc700,len:0x287c
SHA-256 comparison failed:
Calculated: 5915a3eb601e6348eb01a09185a40349448a38ad4ee23325591d0f91b300e34c
Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Attempting to boot anyway...
entry 0x403c98c0

@Jason2866
Copy link
Collaborator

Jason2866 commented Aug 22, 2022

Weird, and the other device works here too?

This "2MB" is more than fishy in the log !!

I (58) boot.esp32s3: Boot SPI Speed : 80MHz
I (63) boot.esp32s3: SPI Mode       : DIO
I (67) boot.esp32s3: SPI Flash Size : 2MB

@SuGlider
Copy link
Collaborator Author

Yes.... That's really weird...
Even Worst: If I use IDF to build and upload a "HelloWorld", it works on both boards.

I think that the issue lies on something related to the second-stage bootloader, because it fails with WDT.

@SuGlider
Copy link
Collaborator Author

Another important information is that both boards work with Arduino Creo 2.0.3... which has the "wrong" S3 bootloader.

@Jason2866
Copy link
Collaborator

Jason2866 commented Aug 22, 2022

Mhh, another strange thing. I builded a framework where the IDF bootlog is enabled. This does work as it should for the ESP32, ESP32-S2 and the ESP32-C3 and i see messages from the 2nd stage bootlloader.
BUT for the S3 i get NO Bootlogs, nothing!
See here #7140 (comment)

@Jason2866
Copy link
Collaborator

And why is it Flash Mode DIO? The board has QIO Flash and you have for sure set QIO.

@SuGlider
Copy link
Collaborator Author

And why is it Flash Mode DIO? The board has QIO Flash and you have for sure set QIO.

Already tried it. No change.

@Jason2866
Copy link
Collaborator

Jason2866 commented Aug 22, 2022

@me-no-dev I have this error log message during a framework build run with the arduino lib builder. It does not stop the building.

[1611/1611] Generating idf_libs
IDF_TARGET: esp32s3, MEMCONF: qio_qspi, PWD: /Users/mac/Git/esp32-arduino-lib-builder, OUT: /Users/mac/Git/esp32-arduino-lib-builder/out/tools/sdk/esp32s3
Renaming 'mbedtls' to 'mbedtls_2': /Users/mac/Git/esp32-arduino-lib-builder/build/esp-idf/mbedtls/mbedtls/library/libmbedtls.a
awk: syntax error at source line 1
 context is
	 >>> /ASFLAGS=\[/{n++}{print>n"pio_start.txt" <<< 
awk: illegal statement at source line 1
awk: syntax error at source line 1
 context is
	 >>> /"ARDUINO_ARCH_ESP32"/{n++}{print>n"pio_end.txt" <<< 
awk: illegal statement at source line 1
cat: pio_start.txt: No such file or directory
rm: pio_end.txt: No such file or directory
rm: 1pio_start.txt: No such file or directory
rm: pio_start.txt: No such file or directory
cat: 1pio_end.txt: No such file or directory
rm: 1pio_end.txt: No such file or directory
awk: syntax error at source line 1
 context is
	 >>> /compiler.cpreprocessor.flags.esp32s3=/{n++}{print>n"platform_start.txt" <<< 
awk: illegal statement at source line 1
gsed: can't read 1platform_start.txt: No such file or directory
awk: syntax error at source line 1
 context is
	 >>> /compiler.ar.flags.esp32s3=/{n++}{print>n"platform_mid.txt" <<< 
awk: illegal statement at source line 1
cat: platform_start.txt: No such file or directory
cat: 1platform_mid.txt: No such file or directory
* Build BootLoader: configs/defconfig.common;configs/defconfig.esp32s3;configs/defconfig.qio;configs/defconfig.120m;configs/defconfig.qio_ram

Idk if this is related, anyhow it is not nice to see

@me-no-dev
Copy link
Member

@Jason2866 this is unrelated and probably caused by awk version or file encoding/line endings

@VojtechBartoska VojtechBartoska removed this from the 2.0.5 milestone Aug 24, 2022
@VojtechBartoska
Copy link
Collaborator

This issue will be investigated at the end of September, it's postponed due to HW location.

@Jason2866
Copy link
Collaborator

Any idea how to get logs from the 2nd stage bootloader for the S3 ?
Tried a simple Blink sketch in IDF. For every MCU except the S3 i get log outputs from the 2nd stage bootloader. Is there a option which is not listed in sdkconfig for the S3 ?

@Jason2866
Copy link
Collaborator

Jason2866 commented Aug 25, 2022

I come to the comclusion that OPI flash mode is not working whether in IDF nor in Arduino. Probably OPI device crashes since the init procedure is missing OPI support.
IDF is doing probably a bit less wrong, so the device starts.
My conclusion is based on the starting message which indicates dio and 2MB flash size and i missed or do not understand how esptool.py is activating the opi mode.
Another indicator that something is just totally off is the fact that it is impossible to active log messages of the 2nd stage bootloader for the S3.
This issue seems not to hit only OPI based devices.

@me-no-dev
Copy link
Member

@Jason2866 no issue with OPI here

@Jason2866
Copy link
Collaborator

Jason2866 commented Aug 25, 2022

@Jason2866 no issue with OPI here

@me-no-dev How do you know it is really! running in mode OPI?
You have no indicator to verify.

Thats why i made the PR (flash mode detection) since we did not know for qio and qout either. Before the change in Arduino Lib Builder the flash mode selection in Platformio was wrong in general. Regarding flash modes i doubt everythig now until it is proven verified.

Edit: Still the question is not answered. Why are no bootlogs possible with the S3 ?

@me-no-dev
Copy link
Member

@Jason2866 OPI can run only in OPI mode. Performance improvement is also visible. What kind of sign do you need? Try to boot OPI chip in another mode and you will see :)

There are no more inconsistencies in flash modes in Arduino. That has all been fixed (in bootloaders and linked libs).

How are you trying to enable boot logs?

@Jason2866
Copy link
Collaborator

@me-no-dev In IDF sdkconfig. Used a simple Blink sketch. Got bootlogs for ESP32, ESP32-C3 and ESP32-S2. For ESP32-S3 no way to get something.

@me-no-dev
Copy link
Member

@Jason2866 you can poke IDF team about that, though I see no reason... you are using the UART port right? Not the USB one?

@Jason2866
Copy link
Collaborator

Yes, Uart and i have connected for tests the USB port too to a terminal.

There are no more inconsistencies in flash modes in Arduino. That has all been fixed (in bootloaders and linked libs).

I am sarcastic, this issue is not real?

@me-no-dev
Copy link
Member

@Jason2866 issue here is something totally different. We do not know yet what is causing it. It happens so far on only one board that @SuGlider has.

@Jason2866
Copy link
Collaborator

Sorry for double postings. Internet issues

@Jason2866
Copy link
Collaborator

@Jason2866 issue here is something totally different. We do not know yet what is causing it. It happens so far on only one board that @SuGlider has.

No not a single issue, a team member from us (Tasmota @Staars) has the same issue. His board a S3 maple eye doing the same bootloop.

@TD-er
Copy link
Contributor

TD-er commented Aug 25, 2022

OPI can run only in OPI mode

That's quite important info.
Can S3 boards also be made using different flash?
If so, then it would be nice to have some kind of autodetect flag in the build env or else we end up doubling the amount of bin types for S3 boards (well, whenever I start supporting these, my own ESP32-S3-BOX is still sealed)

@Jason2866
Copy link
Collaborator

@TD-er See #6426

khoih-prog added a commit to khoih-prog/AsyncTCP_SSL that referenced this issue Sep 4, 2022
### Releases v1.3.0

1. Remove hard-code if possible
2. Improve debug messages by adding functions to display `error/state messages` instead of `cryptic error/state number`
3. Clean up
4. Add support to `ESP32_S3`, using ESP32 core `v2.0.3`. **Don't use `ESP32_S3` with core v2.0.4**. Check [ESP32-S3 Powercycling right after uploading a sketch using Arduino IDE and Arduino Core 2.0.4 #7165](espressif/arduino-esp32#7165)
khoih-prog added a commit to khoih-prog/AsyncTCP_SSL that referenced this issue Sep 4, 2022
### Releases v1.3.0

1. Remove hard-code if possible
2. Improve debug messages by adding functions to display `error/state messages` instead of `cryptic error/state number`
3. Clean up
4. Add support to `ESP32_S3`, using ESP32 core `v2.0.3`. **Don't use `ESP32_S3` with core v2.0.4**. Check [ESP32-S3 Powercycling right after uploading a sketch using Arduino IDE and Arduino Core 2.0.4 #7165](espressif/arduino-esp32#7165)
@VojtechBartoska VojtechBartoska added Resolution: HW issue Issue is in hardware. and removed Status: Awaiting triage Issue is waiting for triage labels Sep 21, 2022
@VojtechBartoska
Copy link
Collaborator

@SuGlider Please write what have been investigated and what is current resolution.

@SuGlider SuGlider removed the Type: Regression Result of unforeseen consequences of a previous change label Nov 5, 2022
@SuGlider
Copy link
Collaborator Author

SuGlider commented Nov 5, 2022

The issue was related to a bad SoC.
We were able to track it to a call related to RTC setup, but that has nothig to do with real issue.
Therefore, this issue is closed now.

@SuGlider SuGlider closed this as completed Nov 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chip: ESP32-S3 Issue is related to support of ESP32-S3 Chip Resolution: HW issue Issue is in hardware.
Projects
Development

No branches or pull requests

5 participants