Skip to content

PICO-D4 fails to read flash in DIO mode #7143

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

Closed
1 task done
pkendall64 opened this issue Aug 17, 2022 · 3 comments
Closed
1 task done

PICO-D4 fails to read flash in DIO mode #7143

pkendall64 opened this issue Aug 17, 2022 · 3 comments
Labels
IDE: PlaformIO Issue relates to PlatformIO IDE
Milestone

Comments

@pkendall64
Copy link

Board

ESP32 PICO Kit V4.1

Device Description

Problem also occurs on other boards with PICO-D4 on them.

Hardware Configuration

Nothing attached

Version

v2.0.4

IDE Name

PlatformIO

Operating System

MacOS 12.5

Flash frequency

40MHz

PSRAM enabled

no

Upload speed

460800

Description

When flashing with QIO mode all is well, when flashing with DIO mode the sketch fails to talk the the built-in flash correctly.

here is the platformio.ini file as well

[env:esp32]
platform = espressif32@5.1.0
board = esp32dev
framework = arduino
board_build.partitions = min_spiffs.csv
board_build.flash_mode = dio
board_build.f_cpu = 240000000L
build_flags =
    -DTARGET_RX=1
monitor_speed = 115200

Sketch

#include <Arduino.h>
#include <SPIFFS.h>

void setup() {
  Serial.begin(115200);
  Serial.printf("Started...\n");
  Serial.printf("%ld\n", ESP.getSketchSize());
  SPIFFS.begin(true);
}

void loop() {
  delay(1000);
  Serial.println(".");
}

Debug Message

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, 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:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
Started...
E (11) esp_image: image at 0x10000 has invalid magic byte (nothing flashed here?)
0
E (13) SPIFFS: mount failed, -10025
E (1950) SPIFFS: mount failed, -10025
[  1953][E][SPIFFS.cpp:114] format(): Formatting SPIFFS failed! Error: -1
[  1953][E][SPIFFS.cpp:89] begin(): Mounting SPIFFS failed! Error: -1
.

Other Steps to Reproduce

No response

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

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

Jason2866 commented Aug 17, 2022

Probably this PR espressif/esp32-arduino-lib-builder#80 will fix.
You can try my fork including this PR

platform = https://github.com/Jason2866/platform-espressif32.git
platform_packages = framework-arduinoespressif32 @ https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/936/framework-arduinoespressif32-443_esp421-9ce849ce72.tar.gz

@VojtechBartoska VojtechBartoska added Status: In Progress ⚠️ Issue is in progress IDE: PlaformIO Issue relates to PlatformIO IDE and removed Status: Awaiting triage Issue is waiting for triage labels Aug 17, 2022
@Jason2866
Copy link
Collaborator

Platformio crew has updated the framework how the firmware is builded. The new version includes the PR (slightly modified) espressif/esp32-arduino-lib-builder#80
To use just delete the hidden .platformio folder and restart VSC/Platformio.
The issue should be solved.

@pkendall64
Copy link
Author

Thanks @Jason2866 thats certainly seems to have fixed the issue.
I was a little worried that all the devices would need to updated via USB/UART rather than OTA, which would have been a right pain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDE: PlaformIO Issue relates to PlatformIO IDE
Projects
Development

No branches or pull requests

3 participants