Un able to get comms to work

Just about every Arduino-based esp32 project I try and upload/monitor gives me the same problem. eg using the LilyGo T-QT module:
The platformio.ini =

[env:esp32-s3-t-qt-pro]
 platform = espressif32
 board = esp32-s3-t-qt-pro
 framework = arduino
 build_flags =
    -DARDUINO_USB_MODE = 1
    -DARDUINO_USB_CDC_ON_BOOT = 1
 monitor_port = COM36
 monitor_speed = 115200
 monitor_rts = 0
 monitor_dtr = 0

and the Board’s json file has been downloaded from

and the main.cpp =

#include <Arduino.h>

// put function declarations here:
int myFunction(int, int);

void setup() {
 Serial.begin(115200); // put your setup code here, to run once:
  delay(500);
  int result = myFunction(2, 3);
}

void loop() {
  // put your main code here, to run repeatedly:
Serial.println(" OK for now..");
delay(750);
}

// put function definitions here:
int myFunction(int x, int y) {
  return x + y;
}

I get the error message:

----------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-s3-t-qt-pro.html
PLATFORM: Espressif 32 (6.6.0) > Espressif ESP32-S3-T-QT (4 MB QD, No PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 4MB 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.20014.231204 (2.0.14)
  • 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
    *** [.pio\build\esp32-s3-t-qt-pro\firmware.elf] Implicit dependency C:\Users\simon\.platformio\platforms\espressif32\builder\=' not found, needed by target .pio\build\esp32-s3-t-qt-pro\firmware.elf’.
    ============================================================ [FAILED] Took 3.52 seconds ============================================================
  • The terminal process “C:\Users\simon.platformio\penv\Scripts\platformio.exe ‘run’, ‘–target’, ‘upload’” terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.

Any thoughts?

Because of the spaces you have inside the build_flags!
Change it to

 build_flags =
    -DARDUINO_USB_MODE=1
    -DARDUINO_USB_CDC_ON_BOOT=1

But these are not necessary since they are already set inside the esp32-s3-t-qt.pro.json boards-file:

      "extra_flags": [
        "-DARDUINO_ESP32S3_DEV",
        "-DARDUINO_USB_MODE=1",
        "-DARDUINO_USB_CDC_ON_BOOT=1",
        "-DARDUINO_RUNNING_CORE=1",
        "-DARDUINO_EVENT_RUNNING_CORE=1"
      ],

As you suspected, there’s been no change. I can upload fresh code. However, when I connect using another communications package, I’m able to see the output. Even with the communications port disconnected, I can’t upload any programs unless I hold down the left button when reconnecting the USB lead.

Sorry I don’t understand.

Does it work or not?

What do you mean by “communications package” ?

When the device is not connected, you can’t upload

Where does this come from? Did you set this? Why?
Did you try without it? Usually this is not necessary!

remove the lines monitor_dtr & monitor_trs from programio.ini.
Stop programio and use any other comms package to monitor the comms port, in my case, serial debug assist om com port 36.

Once I can see an output using above package, I disconnect that port in software and restart Platformio I cant reload any program, unless I unplug the USB, hold down the left button of the module and reconnect the USB. putting me back to square 1.

I’m afraid I can’t understand you.

None of my questions have been answered.

What do you mean by “comms package”?

My alt comms package to monitor comms ports


Latest platformio.ini

[env:esp32-s3-t-qt-pro]
 platform = espressif32
 board = esp32-s3-t-qt-pro
 framework = arduino
 build_flags =
    -DARDUINO_USB_MODE=1
    -DARDUINO_USB_CDC_ON_BOOT=1
 monitor_port = COM36
 monitor_speed = 115200

This is not PlatformIO.

I still don’t get what the actual problem is??

Platform fails to display any serial output from the module, yet I know it must be as I can see an output on the other package

So, another terminal program is showing the output correctly, but PlatformIO Serial monitor doesnt work?

Did you select the correct com port?
image

Tried that still the same, just this displayed:


--- Terminal on COM36 | 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 https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H





My ESP32-S3 is on COM12 on my computer.
Your code and platformio.in works like a charm for me:

--- Terminal on COM12 | 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 https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
 OK for now..
 OK for now..
 OK for now..
 OK for now..
 OK for now..
 OK for now..
 OK for now..
 OK for now..
 OK for now..
 OK for now..

As did mine as of a month ago, but something has screwed it up.

I think I have to completely remove PlatformIO + Arduino + MS Visual Studio!

Is there a way to do this?