Arduino IDF code uploaded to ESP32s3 but does not run

Hi everyone,

I am posting here because the issue is related to the PlatformIO plugin.

I am using an ESP32-S3-WROOM-1U-N16R18 module with VSC 1.102.3 and platformIO 3.3.4.
I am using the native USB IF of the ESP32s3 (GPIO19 D- & GPIO20 D+).
Buttons EN & Boot work as expected.

One thing that i have noticed is that when i create a new project in platformIO using the ESP IDF everything works fine. The programming is fast with an effective speed of around 1.5MBits/s and code starts executing immediately after the last line below:



Writing at 0x0013de95… (100 %)
Wrote 210768 bytes (112261 compressed) at 0x00110000 in 1.1 seconds (effective 1556.8 kbit/s)…
Hash of data verified.

Leaving…
Hard resetting via RTS pin…
— Terminal on /dev/ttyACM0 | 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 Redirecting...
— Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H (LAST LINE)
Turning off the LED
Turning on the LED
Turning off the LED
Turning on the LED

However, when i create a new project in platformIO using the Arduino framework i get the following behavior:

  • Programming works fine
  • Code uploaded to the esp chip does not show signs of execution.

Here is the platformIO json file used that defines various parameters of the project. Notice that there are Arduino-specific params in the json file. This is where you could probably help.

JSON file:

{
    "build": {
      "arduino":{
        "ldscript": "esp32s3_out.ld",
        "partitions": "default_16MB.csv",
        "memory_type": "qio_opi"
      },
      "core": "esp32",
      "extra_flags": [
        "-DBOARD_HAS_PSRAM",
        "-DARDUINO_ESP32S3_DEV",
        "-DARDUINO_USB_MODE=1",
        "-DARDUINO_USB_CDC_ON_BOOT=1"
      ],
      "f_cpu": "240000000L",
      "f_flash": "80000000L",
      "flash_mode": "qio",
      "psram_type": "opi",
      "hwids": [
        [
          "0x303A",
          "0x1001"
        ]
      ],
      "mcu": "esp32s3",
      "variant": "esp32s3"
    },
    "connectivity": [
      "wifi",
      "bluetooth"
    ],
    "debug": {
      "default_tool": "esp-builtin",
      "onboard_tools": [
        "esp-builtin"
      ],
      "openocd_target": "esp32s3.cfg"
    },
    "frameworks": [
      "arduino",
      "espidf"
    ],
    "name": "Espressif ESP32-S3-WROOM-1U-N16R8 (16 MB QD, 8MB PSRAM)",
    "upload": {
      "flash_size": "16MB",
      "maximum_ram_size": 327680,
      "maximum_size": 16777216,
      "require_upload_port": true,
      "speed": 921600
    },
    "url": "https://www.espressif.com/sites/default/files/documentation/esp32-s3-wroom-1_wroom-1u_datasheet_en.pdf",
    "vendor": "Espressif"
  }

Moments later…

I have just noticed something weird. My first post shows the execution of a blinking led programmed when the project was using the ESPIDF.

I have just opened the Arduino-based project in platformIO and programed the esp32 and then the terminal started printing:


Turning off the LED
Turning on the LED
Turning off the LED
Turning on the LED

which basically, as you already understand, means that the programming even though is completed successfully probably does not write to the correct address. In short, the previous code is still executed!

THIS IS THE LOG DATA DURING ESP-IDF PROGRAMMING:

Executing task: platformio run --target upload --target monitor --environment esp32-s3-wroom-1x-n16r8

Processing esp32-s3-wroom-1x-n16r8 (platform: espressif32; board: esp32-s3-wroom-1x-n16r8; framework: espidf)

Verbose mode can be enabled via -v, --verbose option
PLATFORM: Espressif 32 (6.11.0) > Espressif ESP32-S3-WROOM-1U-N16R8 (16 MB QD, 8MB PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 16MB 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-espidf @ 3.50401.0 (5.4.1)
tool-cmake @ 3.16.4
tool-esp-rom-elfs @ 0.0.1+20241011
tool-esptoolpy @ 1.40501.0 (4.5.1)
tool-mkfatfs @ 2.0.1
tool-mklittlefs @ 1.203.210628 (2.3)
tool-mkspiffs @ 2.230.0 (2.30)
tool-ninja @ 1.7.1
tool-riscv32-esp-elf-gdb @ 12.1.0+20221002
tool-xtensa-esp-elf-gdb @ 12.1.0+20221002
toolchain-esp32ulp @ 1.23800.240113 (2.38.0)
toolchain-riscv32-esp @ 14.2.0+20241119
toolchain-xtensa-esp-elf @ 14.2.0+20241119
Reading CMake configuration...
Warning! Flash memory size mismatch detected. Expected 16MB, found 2MB!
Please select a proper value in your sdkconfig.defaults or via the menuconfig target!
LDF: Library Dependency Finder -> Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio/build/esp32-s3-wroom-1x-n16r8/firmware.elf
Checking size .pio/build/esp32-s3-wroom-1x-n16r8/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 4.0% (used 12992 bytes from 327680 bytes)
Flash: [ ] 3.2% (used 210372 bytes from 6553600 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...
Using manually specified: /dev/ttyACM0
Uploading .pio/build/esp32-s3-wroom-1x-n16r8/firmware.bin
esptool.py v4.5.1
Serial port /dev/ttyACM0
Connecting....
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 30:ed:a0:37:05:4c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 1000000
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00109000 to 0x0010afff...
Flash will be erased from 0x00110000 to 0x00143fff...
Compressed 21024 bytes to 13375...
Writing at 0x00000000... (100 %)
Wrote 21024 bytes (13375 compressed) at 0x00000000 in 0.2 seconds (effective 791.5 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 143...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (143 compressed) at 0x00008000 in 0.0 seconds (effective 1044.8 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 31...
Writing at 0x00109000... (100 %)
Wrote 8192 bytes (31 compressed) at 0x00109000 in 0.0 seconds (effective 1965.1 kbit/s)...
Hash of data verified.
Compressed 210768 bytes to 112261...
Writing at 0x00110000... (14 %)
Writing at 0x0011ca9c... (28 %)
Writing at 0x001230b1... (42 %)
Writing at 0x00128dfa... (57 %)
Writing at 0x00130965... (71 %)
Writing at 0x00137d92... (85 %)
Writing at 0x0013de95... (100 %)
Wrote 210768 bytes (112261 compressed) at 0x00110000 in 1.1 seconds (effective 1550.3 kbit/s)...
Hash of data verified.

Leaving…
Hard resetting via RTS pin…
— Terminal on /dev/ttyACM0 | 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 Redirecting…
— Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
Turning off the LED
Turning on the LED
Turning off the LED

THIS IS THE LOG DATA DURING ARDUINO-IDF PROGRAMMING:

Executing task: platformio run --target upload --target monitor --environment esp32-s3-wroom-1x-n16r8

Processing esp32-s3-wroom-1x-n16r8 (platform: espressif32; board: esp32-s3-wroom-1x-n16r8; framework: arduino)

Verbose mode can be enabled via -v, --verbose option
PLATFORM: Espressif 32 (6.11.0) > Espressif ESP32-S3-WROOM-1U-N16R8 (16 MB QD, 8MB PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 16MB 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 @ 3.20017.241212+sha.dcc1105b
tool-esptoolpy @ 1.40501.0 (4.5.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-patch5
toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 33 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio/build/esp32-s3-wroom-1x-n16r8/firmware.elf
Checking size .pio/build/esp32-s3-wroom-1x-n16r8/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 5.7% (used 18692 bytes from 327680 bytes)
Flash: [ ] 3.9% (used 255049 bytes from 6553600 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: /dev/ttyACM0
Uploading .pio/build/esp32-s3-wroom-1x-n16r8/firmware.bin
esptool.py v4.5.1
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 30:ed:a0:37:05:4c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
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 0x0004efff...
Compressed 15104 bytes to 10429...
Writing at 0x00000000... (100 %)
Wrote 15104 bytes (10429 compressed) at 0x00000000 in 0.1 seconds (effective 810.9 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 143...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (143 compressed) at 0x00008000 in 0.0 seconds (effective 1084.0 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 1467.7 kbit/s)...
Hash of data verified.
Compressed 255408 bytes to 142576...
Writing at 0x00010000... (11 %)
Writing at 0x0001d559... (22 %)
Writing at 0x00024359... (33 %)
Writing at 0x00029807... (44 %)
Writing at 0x0002ec6b... (55 %)
Writing at 0x0003495a... (66 %)
Writing at 0x0003ecf6... (77 %)
Writing at 0x00044a5c... (88 %)
Writing at 0x0004a1e3... (100 %)
Wrote 255408 bytes (142576 compressed) at 0x00010000 in 1.4 seconds (effective 1453.9 kbit/s)...
Hash of data verified.

Leaving…
Hard resetting via RTS pin…
— Terminal on /dev/ttyACM0 | 9600 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 Redirecting…
— Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
Turning off the LED
Turning on the LED
Turning off the LED
Turning on the LED
Turning off the LED

The main issue here is that when using Arduino Framework the data being written to the chip is stuck at address 0x10000 instead of the one dictated in the partitions.csv given below. For some good reason the ESP-IDF framework closely follows that file and writes at the right address 0x110000 as indicated in my previous posts.

Partition size analsysis:

# NVS: 1,048,576 B | 1024 KB | 1 MB
# otadata: 8,192 B | 8 KB | 0.008 MB
# app0: 6,553,600 B | 6400 KB | 6.4 MB
# app1: 6,553,600 B | 6400 KB | 6.4 MB
# spiffs: 2,498,560 B | 2440 KB | 2.44 MB
# coredump: 65,536 B | 64 KB | 0.064 MB

Name, Type, SubType, Offset, Size, Flags

nvs, data, nvs, 0x9000, 0x100000,
otadata, data, ota, 0x109000, 0x2000,
app0, app, ota_0, 0x110000, 0x640000,
app1, app, ota_1, 0x750000, 0x640000,
spiffs, data, spiffs, 0xD90000, 0x260000,
coredump, data, coredump, 0xFF0000, 0x10000,

As you can see 0x110000 is the right address to start writing when using the paritions.csv.

In order to make things simpler i commented out the partitions.csv in platformio.ini and now both frameworks use address 0x10000 to start writing data.

ESP-IDF log data:

Executing task: platformio run --target upload --target monitor --environment esp32-s3-wroom-1x-n16r8

Processing esp32-s3-wroom-1x-n16r8 (platform: espressif32; board: esp32-s3-wroom-1x-n16r8; framework: espidf)

Verbose mode can be enabled via -v, --verbose option
PLATFORM: Espressif 32 (6.11.0) > Espressif ESP32-S3-WROOM-1U-N16R8 (16 MB QD, 8MB PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 16MB 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-espidf @ 3.50401.0 (5.4.1)
tool-cmake @ 3.16.4
tool-esp-rom-elfs @ 0.0.1+20241011
tool-esptoolpy @ 1.40501.0 (4.5.1)
tool-mkfatfs @ 2.0.1
tool-mklittlefs @ 1.203.210628 (2.3)
tool-mkspiffs @ 2.230.0 (2.30)
tool-ninja @ 1.7.1
tool-riscv32-esp-elf-gdb @ 12.1.0+20221002
tool-xtensa-esp-elf-gdb @ 12.1.0+20221002
toolchain-esp32ulp @ 1.23800.240113 (2.38.0)
toolchain-riscv32-esp @ 14.2.0+20241119
toolchain-xtensa-esp-elf @ 14.2.0+20241119
Reading CMake configuration...
Warning! Flash memory size mismatch detected. Expected 16MB, found 2MB!
Please select a proper value in your sdkconfig.defaults or via the menuconfig target!
LDF: Library Dependency Finder -> Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio/build/esp32-s3-wroom-1x-n16r8/firmware.elf
Checking size .pio/build/esp32-s3-wroom-1x-n16r8/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 4.0% (used 12992 bytes from 327680 bytes)
Flash: [== ] 20.1% (used 210372 bytes from 1048576 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...
Using manually specified: /dev/ttyACM0
Uploading .pio/build/esp32-s3-wroom-1x-n16r8/firmware.bin
esptool.py v4.5.1
Serial port /dev/ttyACM0
Connecting....
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 30:ed:a0:37:05:4c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 1000000
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00010000 to 0x00043fff...
Compressed 21024 bytes to 13375...
Writing at 0x00000000... (100 %)
Wrote 21024 bytes (13375 compressed) at 0x00000000 in 0.2 seconds (effective 802.3 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 1078.5 kbit/s)...
Hash of data verified.
Compressed 210768 bytes to 112262...
Writing at 0x00010000... (14 %)
Writing at 0x0001ca90... (28 %)
Writing at 0x000230b1... (42 %)
Writing at 0x00028dfa... (57 %)
Writing at 0x00030965... (71 %)
Writing at 0x00037d92... (85 %)
Writing at 0x0003de95... (100 %)
Wrote 210768 bytes (112262 compressed) at 0x00010000 in 1.1 seconds (effective 1555.4 kbit/s)...
Hash of data verified.

Leaving…
Hard resetting via RTS pin…
— Terminal on /dev/ttyACM0 | 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 Redirecting…
— Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
I (98) esp_image: segment 2: paddr=0001ce9c vaddr=40374000 size=Turning off the LED
Turning on the LED
Turning off the LED
Turning on the LED
Turning off the LED
Turning on the LED
Turning off the LED

Arduino-IDF log data:

Executing task: platformio run --target upload --target monitor --environment esp32-s3-wroom-1x-n16r8

Processing esp32-s3-wroom-1x-n16r8 (platform: espressif32; board: esp32-s3-wroom-1x-n16r8; framework: arduino)

Verbose mode can be enabled via -v, --verbose option
PLATFORM: Espressif 32 (6.11.0) > Espressif ESP32-S3-WROOM-1U-N16R8 (16 MB QD, 8MB PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 16MB 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 @ 3.20017.241212+sha.dcc1105b
tool-esptoolpy @ 1.40501.0 (4.5.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-patch5
toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 33 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio/build/esp32-s3-wroom-1x-n16r8/firmware.elf
Checking size .pio/build/esp32-s3-wroom-1x-n16r8/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 5.7% (used 18692 bytes from 327680 bytes)
Flash: [ ] 3.9% (used 255049 bytes from 6553600 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...
Using manually specified: /dev/ttyACM0
Uploading .pio/build/esp32-s3-wroom-1x-n16r8/firmware.bin
esptool.py v4.5.1
Serial port /dev/ttyACM0
Connecting.....
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 30:ed:a0:37:05:4c
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 1000000
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 0x0004efff...
Compressed 15104 bytes to 10429...
Writing at 0x00000000... (100 %)
Wrote 15104 bytes (10429 compressed) at 0x00000000 in 0.2 seconds (effective 795.4 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.0 seconds (effective 1105.1 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 1405.3 kbit/s)...
Hash of data verified.
Compressed 255408 bytes to 142576...
Writing at 0x00010000... (11 %)
Writing at 0x0001d559... (22 %)
Writing at 0x00024359... (33 %)
Writing at 0x00029807... (44 %)
Writing at 0x0002ec6b... (55 %)
Writing at 0x0003495a... (66 %)
Writing at 0x0003ecf6... (77 %)
Writing at 0x00044a5c... (88 %)
Writing at 0x0004a1e3... (100 %)
Wrote 255408 bytes (142576 compressed) at 0x00010000 in 1.4 seconds (effective 1457.2 kbit/s)...
Hash of data verified.

Leaving…
Hard resetting via RTS pin…
— Terminal on /dev/ttyACM0 | 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 Redirecting…
— Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
Disconnected (device reports readiness to read but returned no data (device disconnected or multiple access on port?))
Reconnecting to /dev/ttyACM0 . Connected!
Disconnected (device reports readiness to read but returned no data (device disconnected or multiple access on port?))
Reconnecting to /dev/ttyACM0 Connected!
Disconnected (device reports readiness to read but returned no data (device disconnected or multiple access on port?))
Reconnecting to /dev/ttyACM0 Connected!
Disconnected (device reports readiness to read but returned no data (device disconnected or multiple access on port?))
Reconnecting to /dev/ttyACM0 …

In the case of the Arduino IDF, after programming, the USB IF is disconnected and then reconnected and that cycle goes on for ever…

Both IDFs now use address 0x10000 but only ESP-IDF code execution works.

Regards
Manos

Regarding Arduino IDF:

I fixed the issue of the code not-running in the chip by commenting out the partitions.csv in the platformio.ini file and by removing line:

“memory_type”: “qio_opi”

from the json file. However after re-trying to use partitions.csv the chip kept reseting itself very fast:



load:0x403cc700,len:0x2a0c
entry 0x403c98d0
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cdb0a
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cdb0a
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cdb0a
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cdb0a
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cdb0a
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0

I will come back with more info…

Manos

Regarding ESP_IDF:

Everything works fine without the json line and also with or without the partitions.csv. In any case the correct address is used for writing data to the chip based on whether partitions.csv is used or not.

So no problems there.

Manos.

You’ve made so many posts and dug yourself into increasingly deeper holes, but I really think your original problem is the one discussed a couple of times a week here.

But if you’re on Arduino 3.anything, you’re not using Platformio; You’re using PIOArduino.

But if you specify a flash speed that doesn’t match or a partition size that’s too large—especially when you’ve maimed serial debug output - you’re in for a bad day.

Take the time to configure and learn to use a debugger.

Thanks Robert,

Nothing more really to say.

Since i can program and execute the code using Arduino IDF (when using default partitioning) i will set this thread to solved.

Thanks for your time.

Regards
Manos