Dear Expert, could you advice why Platformio monitor does not print, while Arduino works ok with the same simple code? Does my platformio.ini file miss any necessary setting?
My device is ESP32-S3FH4R2 with 4 MB flash and 2 MB PSRAM inside.
This is my main.cpp code:
void setup() {
Serial.begin(115200);
delay(2000);
Serial.println("Started");
Serial.println("I am talking.............................\n");
}
void loop() {}
This is what Arduino monitor shows:
11:57:51.779 -> ESP-ROM:esp32s3-20210327
11:57:51.779 -> Build:Mar 27 2021
11:57:51.779 -> rst:0x1 (POWERON),boot:0xb (SPI_FAST_FLASH_BOOT)
11:57:51.779 -> SPIWP:0xee
11:57:51.779 -> mode:DIO, clock div:1
11:57:51.779 -> load:0x3fce3808,len:0x44c
11:57:51.779 -> load:0x403c9700,len:0xbe4
11:57:51.779 -> load:0x403cc700,len:0x2a38
11:57:51.779 -> entry 0x403c98d4
11:57:53.823 -> Started
11:57:53.823 -> I am talking.............................
11:57:53.823 ->
This is my Arduino setting:
Arduino uploads successfully:
Sketch uses 254617 bytes (19%) of program storage space. Maximum is 1310720 bytes.
Global variables use 19480 bytes (5%) of dynamic memory, leaving 308200 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5.1
Serial port COM21
Connecting..............
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz
MAC: dc:54:75:d6:cc:a0
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 15040 bytes to 10331...
Writing at 0x00000000... (100 %)
Wrote 15040 bytes (10331 compressed) at 0x00000000 in 0.3 seconds (effective 350.6 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 544.5 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 750.7 kbit/s)...
Hash of data verified.
Compressed 254976 bytes to 142530...
Writing at 0x00010000... (11 %)
Writing at 0x0001d907... (22 %)
Writing at 0x00024191... (33 %)
Writing at 0x0002963f... (44 %)
Writing at 0x0002eb74... (55 %)
Writing at 0x000341e9... (66 %)
Writing at 0x0003d675... (77 %)
Writing at 0x000449bb... (88 %)
Writing at 0x0004a19d... (100 %)
Wrote 254976 bytes (142530 compressed) at 0x00010000 in 2.9 seconds (effective 714.7 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
This is what the Platformio Monitor shows:
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0xb (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x1654
load:0x403b6000,len:0xed4
load:0x403ba000,len:0x32dc
entry 0x403b632c
␛[0;32mI (21) boot: ESP-IDF v4.4.1-405-g6c5fb29c2c 2nd stage bootloader␛[0m
␛[0;32mI (22) boot: compile time 04:21:58␛[0m
␛[0;32mI (22) boot: chip revision: 0␛[0m
␛[0;32mI (25) qio_mode: Enabling default flash chip QIO␛[0m
␛[0;32mI (30) boot.esp32s3: Boot SPI Speed : 80MHz␛[0m
␛[0;32mI (35) boot.esp32s3: SPI Mode : QIO␛[0m
␛[0;32mI (40) boot.esp32s3: SPI Flash Size : 4MB␛[0m
␛[0;32mI (44) boot: Enabling RNG early entropy source...␛[0m
␛[0;32mI (50) boot: Partition Table:␛[0m
␛[0;32mI (53) boot: ## Label Usage Type ST Offset Length␛[0m
␛[0;32mI (60) boot: 0 nvs WiFi data 01 02 00009000 00005000␛[0m
␛[0;32mI (68) boot: 1 otadata OTA data 01 00 0000e000 00002000␛[0m
␛[0;32mI (75) boot: 2 ota_0 OTA app 00 10 00010000 00160000␛[0m
␛[0;32mI (83) boot: 3 ota_1 OTA app 00 11 00170000 00160000␛[0m
␛[0;32mI (90) boot: 4 uf2 factory app 00 00 002d0000 00040000␛[0m
␛[0;32mI (98) boot: 5 ffat Unknown data 01 81 00310000 000f0000␛[0m
␛[0;32mI (105) boot: End of partition table␛[0m
␛[0;32mI (110) boot: Detect double reset using RC on GPIO 34 to enter UF2 bootloader␛[0m
␛[0;32mI (117) esp_image: segment 0: paddr=002d0020 vaddr=3c020020 size=065b4h ( 26036) map␛[0m
␛[0;32mI (130) esp_image: segment 1: paddr=002d65dc vaddr=3fc90030 size=01c74h ( 7284) load␛[0m
␛[0;32mI (135) esp_image: segment 2: paddr=002d8258 vaddr=40374000 size=07dc0h ( 32192) load␛[0m
␛[0;32mI (149) esp_image: segment 3: paddr=002e0020 vaddr=42000020 size=143c8h ( 82888) map␛[0m
␛[0;32mI (164) esp_image: segment 4: paddr=002f43f0 vaddr=4037bdc0 size=04264h ( 16996) load␛[0m
␛[0;32mI (167) esp_image: segment 5: paddr=002f865c vaddr=50000000 size=00010h ( 16) load␛[0m
␛[0;32mI (174) boot: Loaded app from partition at offset 0x2d0000␛[0m
␛[0;32mI (176) boot: Disabling RNG early entropy source...␛[0m
␛[0;32mI (193) cpu_start: Pro cpu up.␛[0m
␛[0;32mI (193) cpu_start: Starting app cpu, entry point is 0x40374d0c␛[0m
␛[0;32mI (0) cpu_start: App cpu up.␛[0m
␛[0;32mI (207) cpu_start: Pro cpu start user code␛[0m
␛[0;32mI (207) cpu_start: cpu freq: 160000000␛[0m
␛[0;32mI (207) cpu_start: Application information:␛[0m
␛[0;32mI (209) cpu_start: Project name: tinyuf2␛[0m
␛[0;32mI (214) cpu_start: App version: 0.10.2␛[0m
␛[0;32mI (219) cpu_start: Compile time: Jun 24 2022 04:21:54␛[0m
␛[0;32mI (225) cpu_start: ELF file SHA256: 40515fb2e6caf07a...␛[0m
␛[0;32mI (231) cpu_start: ESP-IDF: v4.4.1-405-g6c5fb29c2c␛[0m
␛[0;32mI (238) heap_init: Initializing. RAM available for dynamic allocation:␛[0m
␛[0;32mI (245) heap_init: At 3FCA53B0 len 0003AC50 (235 KiB): D/IRAM␛[0m
␛[0;32mI (251) heap_init: At 3FCE0000 len 0000EE34 (59 KiB): STACK/DRAM␛[0m
␛[0;32mI (258) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM␛[0m
␛[0;32mI (264) heap_init: At 600FE000 len 00002000 (8 KiB): RTCRAM␛[0m
␛[0;32mI (271) spi_flash: detected chip: generic␛[0m
␛[0;32mI (275) spi_flash: flash io: qio␛[0m
␛[0;32mI (279) sleep: Configure to isolate all GPIO pins in sleep state␛[0m
␛[0;32mI (286) sleep: Enable automatic switching of GPIO sleep configuration␛[0m
␛[0;32mI (293) cpu_start: Starting scheduler on PRO CPU.␛[0m
␛[0;32mI (0) cpu_start: Starting scheduler on APP CPU.␛[0m
␛[0;32mI (313) gpio: GPIO[21]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 ␛[0m
This is my platformio.ini file:
[env:adafruit_feather_esp32s3]
platform = espressif32
board = adafruit_feather_esp32s3
framework = arduino
monitor_speed = 115200
The file compiled and uploaded success:
* Executing task in folder SimpleSerial: C:\Users\.platformio\penv\Scripts\platformio.exe run --target upload
Processing adafruit_feather_esp32s3 (platform: espressif32; board: adafruit_feather_esp32s3; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/adafruit_feather_esp32s3.html
PLATFORM: Espressif 32 (6.3.2) > Adafruit Feather ESP32-S3 2MB PSRAM
HARDWARE: ESP32S3 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olim
ex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20009.0 (2.0.9)
- 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 -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 33 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio\build\adafruit_feather_esp32s3\firmware.elf
Checking size .pio\build\adafruit_feather_esp32s3\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 9.6% (used 31544 bytes from 327680 bytes)
Flash: [== ] 19.2% (used 276873 bytes from 1441792 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-us
b-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM21
Forcing reset using 1200bps open/close on port COM21
Waiting for the new upload port...
Uploading .pio\build\adafruit_feather_esp32s3\firmware.bin
esptool.py v4.5.1
Serial port COM21
Connecting.........
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz
MAC: dc:54:75:d6:cc:a0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
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 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x002d0000 to 0x002f8fff...
Flash will be erased from 0x00010000 to 0x00053fff...
Compressed 22624 bytes to 14246...
Writing at 0x00000000... (100 %)
Wrote 22624 bytes (14246 compressed) at 0x00000000 in 0.6 seconds (effective 287.4 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 136...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (136 compressed) at 0x00008000 in 0.0 seconds (effective 513.2 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 748.4 kbit/s)...
Hash of data verified.
Compressed 165520 bytes to 106744...
Writing at 0x002d0000... (14 %)
Writing at 0x002d8664... (28 %)
Writing at 0x002ddbcc... (42 %)
Writing at 0x002e459a... (57 %)
Writing at 0x002ea56e... (71 %)
Writing at 0x002efea6... (85 %)
Writing at 0x002f52bd... (100 %)
Wrote 165520 bytes (106744 compressed) at 0x002d0000 in 2.8 seconds (effective 464.9 kbit/s)...
Hash of data verified.
Compressed 277232 bytes to 158119...
Writing at 0x00010000... (10 %)
Writing at 0x0001c4d1... (20 %)
Writing at 0x0002466f... (30 %)
Writing at 0x00029c3f... (40 %)
Writing at 0x0002efb8... (50 %)
Writing at 0x00034229... (60 %)
Writing at 0x0003a529... (70 %)
Writing at 0x00044b68... (80 %)
Writing at 0x0004a361... (90 %)
Writing at 0x0004fd47... (100 %)
Wrote 277232 bytes (158119 compressed) at 0x00010000 in 4.1 seconds (effective 536.0 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
================================================================== [SUCCESS] Took 23.42 seconds ==================================================================
* Terminal will be reused by tasks, press any key to close it.
The main.cpp codes are very simple. It seems to me a setting problem, but I am not sure why Platformio monitor shows totally different outputs in comparing to Arduino. I couldn’t figure out what difference cause this problem.
Thank You in advance