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

FLASH 8 M impossible to use #6803

Closed
1 task done
moreauftheobald opened this issue May 25, 2022 · 18 comments
Closed
1 task done

FLASH 8 M impossible to use #6803

moreauftheobald opened this issue May 25, 2022 · 18 comments
Assignees
Labels
Resolution: Awaiting response Waiting for response of author Status: Test needed Issue needs testing
Milestone

Comments

@moreauftheobald
Copy link

Board

ESP32-S3-DevKitC-1 N8R8

Device Description

ESP32-S3-DevKitC-1 N8R8 stand Alone

Hardware Configuration

not any connection

Version

v2.0.3

IDE Name

Arduino IDE

Operating System

Linux UBUNTU

Flash frequency

QIO 80Mhz, DIO 80Mhz, OPI 80Mhz

PSRAM enabled

yes

Upload speed

921600

Description

ESP32 reboot continusmy when partition activated envolve memory space UP to 4Mb

Tested With all FLASH mode QIO, DIO OPI a 80 and 120Mz with bootloader upload each time.

when select Huge APP or Default 4MB (both) or other partion Sheme involving 4MB flash everything is working, When using 8M flash or personnal partition file ESP32 S3 reboot with no special error message.

Sketch

int i = 0;

void setup() {
  Serial.begin(9600);

}

void loop() {
  // put your main code here, to run repeatedly:
  i++;
  Serial.println("Hello "+String(i,10));
  delay(1000);
}

Debug Message

entry 0x403b61c0

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403bb0ce
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x39c
load:0x403b6000,len:0x9a4
load:0x403ba000,len:0x2868
entry 0x403b61c0
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403bb0ce
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x39c
load:0x403b6000,len:0x9a4
load:0x403ba000,len:0x2868

Other Steps to Reproduce

Personnal Partition file (not working ) :

Name | Type | SubType | Offset | Size | Flags

nvs | data | nvs | 0x9000 | 0x5000 |  
app0 | app | ota_0 | 0x10000 | 0x600000 |  
spiffs | data | spiffs | 0x610000 | 0xF0000 |  

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

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@moreauftheobald moreauftheobald added the Status: Awaiting triage Issue is waiting for triage label May 25, 2022
@meltdown03
Copy link
Contributor

meltdown03 commented May 26, 2022

I get a similar error when using any settings and tying to flash any program on my ESP32-S3-DevKitC-1 (E2N8), no PSRAM, 8MB:

20:02:43.653 -> ESP-ROM:esp32s3-20210327
20:02:43.653 -> Build:Mar 27 2021
20:02:43.653 -> rst:0x7 (TG0WDT_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
20:02:43.653 -> Saved PC:0x400454d5
20:02:43.653 -> SPIWP:0xee
20:02:43.653 -> mode:QIO, clock div:2
20:02:43.653 -> load:0x3fcd0108,len:0x43c
20:02:43.653 -> ets_loader.c 78 
20:02:44.184 -> ESP-ROM:esp32s3-20210327
20:02:44.217 -> Build:Mar 27 2021
20:02:44.217 -> rst:0x10 (RTCWDT_RTC_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
20:02:44.217 -> SPIWP:0xee
20:02:44.217 -> mode:QIO, clock div:2
20:02:44.217 -> load:0x3fcd0108,len:0x43c
20:02:44.217 -> ets_loader.c 78

@meltdown03
Copy link
Contributor

meltdown03 commented May 26, 2022

If I use PlatformIO and the same Arduino version (master branch), I have no problems. And if I revert the last commit adb88d7, it works in the Arduino IDE

@Jason2866
Copy link
Collaborator

Jason2866 commented May 26, 2022

@moreauftheobald Esptool.py v3.3 installed and using? Without you run in this issue.
I never tried to do a partition scheme without the entry

otadata, data, ota, 0xe000, 0x2000,

Afaik it is needed.

@moreauftheobald
Copy link
Author

My version of esptool is V3.3-dev

PS /xxx/xxx/.arduino15/packages/esp32/hardware/esp32/2.0.3/tools> python esptool.py version
esptool.py v3.3-dev
3.3-dev
PS /home/moreauf/.arduino15/packages/esp32/hardware/esp32/2.0.3/tools>

PS /xxx/xxx/.arduino15/packages/esp32/hardware/esp32/2.0.3/tools> python esptool.py -p /dev/ttyACM0 flash_id
esptool.py v3.3-dev
Serial port /dev/ttyACM0
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3
Features: WiFi, BLE
Crystal is 40MHz
MAC: 7c:df:a1:e3:4e:b0
Uploading stub...
Running stub...
Stub running...
Manufacturer: 20
Device: 4017
Detected flash size: 8MB
Hard resetting via RTS pin...

@moreauftheobald
Copy link
Author

@moreauftheobald Esptool.py v3.3 installed and using? Without you run in this issue. I never tried to do a partition scheme without the entry

otadata, data, ota, 0xe000, 0x2000,

Afaik it is needed.

I think to, but Huge_app partition have this partitions but dont work to...

@meltdown03
Copy link
Contributor

I had to use esptool.py v4 to fix the issue with mine. Strange as it only happens with the Arduino IDE even though PlatformIO uses esptool.py v3.3, but it works.

@moreauftheobald
Copy link
Author

I had to use esptool.py v4 to fix the issue with mine. Strange as it only happens with the Arduino IDE even though PlatformIO uses esptool.py v3.3, but it works.

could you just explain me how to setup ESPTOOL V4 on arduino IDE ? I've tried to do it, but did not success.

@VojtechBartoska VojtechBartoska added Status: Needs investigation We need to do some research before taking next steps on this issue and removed Status: Awaiting triage Issue is waiting for triage labels May 30, 2022
@prosd
Copy link

prosd commented Jun 5, 2022

Same issue here!

Using partition layout with total of less then 4Mb works. If I use (any combination) of partitions which results in a total of > 4Mb the board keeps rebooting (SW_RESET)

Working partition layout :
`

Name, Type, SubType, Offset, Size, Flags

nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
ffat, data, fat, 0x310000,0xF0000,
#ffat, data, fat, 0x310000,0x300000,
`
Changing size of ffat partition from 0xF0000 to 0x300000 causes issue

Tested on 2 different boards with 4 and 16 Mb of psram (Lily Go V7 and Lolin D32 Pro)

Thanks!

@Jason2866
Copy link
Collaborator

My AI Thinker ESP-S3-12K Board (8 MB Flash / 8 MB PSRAM both QIO) works fine with this boards definition and Platformio

{
  "build": {
    "arduino":{
      "ldscript": "esp32s3_out.ld",
      "memory_type": "qspi_qspi"
    },
    "core": "esp32",
    "extra_flags": "-DBOARD_HAS_PSRAM -DARDUINO_USB_MODE=0 -DARDUINO_USB_CDC_ON_BOOT=0 -DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0 -DESP32_8M -DESP32S3",
    "f_cpu": "240000000L",
    "f_flash": "80000000L",
    "flash_mode": "dio",
    "mcu": "esp32s3",
    "variant": "esp32s3",
    "partitions": "partitions/esp32_partition_app2944k_fs2M.csv"
  },
  "connectivity": [
    "wifi",
    "bluetooth",
    "ethernet"
  ],
  "debug": {
    "openocd_target": "esp32s3.cfg"
  },
  "frameworks": [
    "espidf",
    "arduino"
  ],
  "name": "Espressif Generic ESP32-S3 8M Flash, Tasmota 2944k Code/OTA, 2112k FS",
  "upload": {
    "flash_size": "8MB",
    "maximum_ram_size": 327680,
    "maximum_size": 8388608,
    "require_upload_port": true,
    "speed": 460800
  },
  "url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
  "vendor": "Espressif"
}

and this partition scheme

# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x5000,
otadata,  data, ota,     0xe000,  0x2000,
app0,     app,  ota_0,   0x10000, 0x2F0000,
app1,     app,  ota_1,   0x300000, 0x2F0000,
spiffs,   data, spiffs,  0x5F0000,0x210000,

@prosd
Copy link

prosd commented Jun 6, 2022

Thank you for the detailed information Jason!

Your board definition got me on the right track.

My Lolin board has 16Mb while platformio's board definition file for this board defines a flash size of '4MB'.
In the past, using Espressif V3.x, this has never been a problem, up until now (with V4.4) it seems!

After modifying the board definition, changing the flash size to 16Mb, the problem was solved.
So thanks agian for pointing me in the right direction!!

@BlueAndi
Copy link
Contributor

BlueAndi commented Jun 6, 2022

@ivankravets Could you have a look here?

@Jason2866
Copy link
Collaborator

Jason2866 commented Jun 6, 2022

@BlueAndi What should Ivan Kravets do here? The boards.json flash_size has to be align with the partition scheme. It is not possible to use with a 4MB definition a parttition scheme which has definitions >4MB. If you have such a case override the flash_size in your platformio.ini.
Since many boards are sold with the same name and different flash / PSRAM sizes and flash types it is impossible to add all this combinations in different predefined boards.json. The greatest pitfall is the flash/PSRAM type definition. If this setting is not correct the board will bootloop.
To be clear, every case of bootlooping S3 i was helping was a incorrect setup in ArduinoIDE or PlatformIO.

@BlueAndi
Copy link
Contributor

BlueAndi commented Jun 6, 2022

@Jason2866 Yes, you right. Using the overwrite mechanism can fix it.

board_upload.flash_size = "8MB"
board_upload.maximum_size = 8388608

It was more like FYI, because in older setups it was working without explicit overwrite it. A custom 8MB partition table was enough. Anyway my notification to Ivan was not accurate enough, thats true. Sry ...

@dexter323i
Copy link

Same for me. I have ESP32 wrover 16MB flash version. It works with deafult partition, but goes into infinite restart loop with large_spiffs_16MB.csv partition scheme. Addig this line into platforio.ini solved it for me too:
board_upload.flash_size=16MB

@VojtechBartoska
Copy link
Contributor

Hello @moreauftheobald, Can you please help us with testing under latest version of Arduino core 2.0.5? Thanks in advance!

@VojtechBartoska VojtechBartoska added Status: Test needed Issue needs testing Resolution: Awaiting response Waiting for response of author and removed Status: Needs investigation We need to do some research before taking next steps on this issue labels Sep 21, 2022
@moreauftheobald
Copy link
Author

I'll try to test it.... i'm a kind busy, but i will try to find time to d it.

@moreauftheobald
Copy link
Author

Just tryed it, il works perfectly event with custom partition scheme.

@me-no-dev
Copy link
Member

Thanks for confirming @moreauftheobald

Repository owner moved this from Todo to Done in Arduino ESP32 Core Project Roadmap Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Awaiting response Waiting for response of author Status: Test needed Issue needs testing
Projects
Development

No branches or pull requests

8 participants