Pio ESP32 programming fail - Resolved

Please help, years’ programs suddenly ‘program’ but do not run.

For testing, I made simple Arduino program - that works - programs and runs.
(Programs means Upload / Runs means execute)

On Pio the program compiles successful, programs up to 100% but it seems the programming had not been completed as the micro does nothing. I tried everything for days…

platformio.ini:

[env:esp32-s3-devkitc-1]

platform = espressif32

board = esp32-s3-devkitc-1

board_build.mcu = esp32s3

framework = arduino

Main.cpp

#include “Arduino.h”

#define Led 15

void setup() {

pinMode(Led, OUTPUT);

}

void loop()

{

digitalWrite(Led,HIGH);

delay(1000);

digitalWrite(Led,LOW);

delay(1000);

}

Any ideas will be appreciated, thank you, Pieter

I suspect this issue came up after I tried ESP-IDF for ESP32-S31, but I found ESP-IDF so extremely old-fassion and quit that. Updates of the ESP-IDF could possibly change the Pio programming settings?

Delete the whole C:\Users\<user>\.platformio folder and restart VSCode if you suspect it is a state issue. It will redownload PlatformIO, the platform, the tools etc, and you can upload again after that.

Thank you Gerhard, did that, but still the same:

Compiled and programmed again with Arduino - works

Tried all the boards and other settings on Platformio - it programs - but Micro does not run

Okay, with all packages clean, one source of error is eliminated.

Can you show a screenshot of the Arduino IDE → Tools menu? It’s important to match all those options to the PlatformIO build.

I tried platformio.ini:

[env:esp32-s3-devkitc-1]

framework = arduino

platform = espressif32

board = esp32-s3-devkitc-1

board_build.flash_mode = qio

board_build.f_flash = 80000000L

upload_speed = 921600

board_build.f_cpu = 240000000L

upload_protocol = esptool

Flashing the micro with ESP32S Flash download tool: Programs the micro but it also does not run.

The board definition is fine except for the fact that it specifies a 8 mbyte flash instead of a 4 mbyte one. You might want to try

[env:esp32-s3-devkitc-1]
platform = espressif32
framework = arduino
board = esp32-s3-devkitc-1
board_upload.flash_size = 4MB
board_build.partitions = default.csv

I think the problem is resolved.

I tried another “board” and it works: :hot_face:

platformio.ini

[env:esp32-s3-devkitc-1]

framework = arduino

platform = espressif32

board = adafruit_feather_esp32s3

Thank you very much Gerhardt / Max - shows how one can get stuck into a mind frame and just needs someone to break that. An example of how to isolate a problem.

Oh? That board is special, it activates the USB CDC by default (so Serial goes out via USB instead of UART) and its partition table has the tinyuf2 bootlaoder included. Other than that it’s also a 4 MByte flash board. Interesting that this works for you, I wonder what the critical change is.. The 4 MByte flash and regular 4mbyte partition table, or that tinyuf2.

I suspect that the env:esp32-s3-devkitc-1 had been tampered with. What else can it be.

The deletion of C:\Users\<user>\.platformio and subsequent reinstall should have cleanly reset that file.