espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.69k stars 7.42k forks source link

WROOM2 32MB Partition Discrepancies in boards.txt #10394

Closed microfoundry closed 1 month ago

microfoundry commented 1 month ago

Board

ESP32S3 Dev Module Octal (WROOM2)

Device Description

DevKitC

Hardware Configuration

No

Version

latest development Release Candidate (RC-X)

IDE Name

ArduinoIDE 2.3.3

Operating System

Win 11

Flash frequency

80 Mhz

PSRAM enabled

yes

Upload speed

921600

Description

Inconsistent naming convention for 32MB partitions breaks Arduino IDE's Language Server. I'm taking a swag at this based on the output from the Language Server logs:

cmd /c if not exist "C:\\Users\\TerryPhillips\\AppData\\Local\\Temp\\arduino-language-server668929682\\build\\partitions.csv" COPY "C:\\Users\\TerryPhillips\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.0-RC1\\tools\\partitions\\app5M_fat24M_32MB.csv" "C:\\Users\\TerryPhillips\\AppData\\Local\\Temp\\arduino-language-server668929682\\build\\partitions.csv"
The system cannot find the file specified.

In the boards.txt config, the partition entries are as such:

esp32s3-octal.menu.PartitionScheme.app5M_fat24M_32MB=32M Flash (4.8MB APP/22MB FATFS)
esp32s3-octal.menu.PartitionScheme.app5M_fat24M_32MB.build.partitions=large_fat_32MB
esp32s3-octal.menu.PartitionScheme.app5M_fat24M_32MB.upload.maximum_size=4718592
esp32s3-octal.menu.PartitionScheme.app5M_little24M_32MB=32M Flash (4.8MB APP/22MB LittleFS)
esp32s3-octal.menu.PartitionScheme.app5M_little24M_32MB.build.partitions=large_littlefs_32MB
esp32s3-octal.menu.PartitionScheme.app5M_little24M_32MB.upload.maximum_size=4718592

But under the FlashSize option, it is as:

esp32s3-octal.menu.FlashSize.32M.build.flash_size=32MB
esp32s3-octal.menu.FlashSize.32M.build.partitions=app5M_fat24M_32MB

Sketch

Any sketch

Debug Message

Arduino IDE Language Server log:

cmd /c if not exist "C:\\Users\\TerryPhillips\\AppData\\Local\\Temp\\arduino-language-server668929682\\build\\partitions.csv" COPY "C:\\Users\\TerryPhillips\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.1.0-RC1\\tools\\partitions\\app5M_fat24M_32MB.csv" "C:\\Users\\TerryPhillips\\AppData\\Local\\Temp\\arduino-language-server668929682\\build\\partitions.csv"
The system cannot find the file specified.

Other Steps to Reproduce

Choose a different memory size, the Language Server will function as expected. Modify the following and the Language Server will function as expected. esp32s3-octal.menu.FlashSize.32M.build.partitions=large_fat_32MB Or create a copy large_fat_32MB.csv as app5M_fat24M_32MB.csv and the Language Server will function as expected...

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

P-R-O-C-H-Y commented 1 month ago

Hi @microfoundry, I was testing with both Arduino IDEs and with Arduino-cli commands to set the FlashSize in FQBN, but the partition used was always the default, so the one undertake FlashSize menu was not overwriting it, and also there is no overwrite for upload.maximum_size. I have opened a PR that removes all the partition overwrites from the FlashSize menu.