My ttgo-lora-oled board compiles, but continuously reboots using Blink, PlatformIO and VSCode with Ubuntu 20.04. The Arduino IDE has no problem uploading and running Blink. I can also program the same board with VSCode and PlatformIO on a Windows 10 machine. I can also program a Nano using Ubuntu, VSCode and PlatformIO, so something seems to be going on specific to the configuration for board = ttgo-lora32-v1.
platformio.ini
[env:ttgo-lora32-v1]
platform = espressif32
board = ttgo-lora32-v1
framework = arduino
monitor_speed =115200
Compile output:
- Executing task in folder blink_ttgo: platformio run --target upload
Processing ttgo-lora32-v1 (platform: espressif32; board: ttgo-lora32-v1; framework: arduino)
Verbose mode can be enabled via
-v, --verbose
option
CONFIGURATION: Redirecting...
PLATFORM: Espressif 32 (5.1.0) > TTGO LoRa32-OLED V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) 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.20004.0 (2.0.4)
- tool-esptoolpy @ 1.30300.0 (3.3.0)
- tool-mkfatfs @ 2.0.1
- tool-mklittlefs @ 1.203.210628 (2.3)
- tool-mkspiffs @ 2.230.0 (2.30)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 32 compatible libraries
Scanning dependencies…
No dependencies
Building in release mode
Retrieving maximum program size .pio/build/ttgo-lora32-v1/firmware.elf
Checking size .pio/build/ttgo-lora32-v1/firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [ ] 4.9% (used 16192 bytes from 327680 bytes)
Flash: [== ] 16.9% (used 221209 bytes from 1310720 bytes)
Configuring upload protocol…
AVAILABLE: cmsis-dap, esp-bridge, 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/ttgo-lora32-v1/firmware.bin
esptool.py v3.3
Serial port /dev/ttyACM0
Connecting…
Chip is ESP32-D0WDQ6-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 26MHz
MAC: 78:21:84:88:30:a4
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 460800
Changed.
Configuring flash size…
Flash will be erased from 0x00001000 to 0x00005fff…
Flash will be erased from 0x00008000 to 0x00008fff…
Flash will be erased from 0x0000e000 to 0x0000ffff…
Flash will be erased from 0x00010000 to 0x00046fff…
Flash params set to 0x0220
Compressed 17408 bytes to 12093…
Writing at 0x00001000… (100 %)
Wrote 17408 bytes (12093 compressed) at 0x00001000 in 0.5 seconds (effective 273.7 kbit/s)…
Hash of data verified.
Compressed 3072 bytes to 128…
Writing at 0x00008000… (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.1 seconds (effective 352.6 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 498.7 kbit/s)…
Hash of data verified.
Compressed 221600 bytes to 121949…
Writing at 0x00010000… (12 %)
Writing at 0x0001d8e0… (25 %)
Writing at 0x00023344… (37 %)
Writing at 0x000286d7… (50 %)
Writing at 0x0002d96f… (62 %)
Writing at 0x000361f8… (75 %)
Writing at 0x0003e26e… (87 %)
Writing at 0x0004399f… (100 %)
Wrote 221600 bytes (121949 compressed) at 0x00010000 in 2.9 seconds (effective 604.0 kbit/s)…
Hash of data verified.Leaving…
Hard resetting via RTS pin…
===================================== [SUCCESS] Took 10.32 seconds =====================================
- Terminal will be reused by tasks, press any key to close it.
Rebooting sequence
- Executing task in folder blink_ttgo: platformio device monitor
— 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+Hassert failed: do_core_init startup.c:298 (flash_ret == ESP_OK)
Backtrace:0x400832ed:0x3ffe3aa00x40087155:0x3ffe3ac0 0x4008bc65:0x3ffe3ae0 0x400d6796:0x3ffe3c10 0x40082a09:0x3ffe3c40 0x400792ba:0x3ffe3c90 |<-CORRUPTED
ELF file SHA256: 0000000000000000
Rebooting…
ets Jul 29 2019 12:21:46rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, 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 0x400805e4assert failed: do_core_init startup.c:298 (flash_ret == ESP_OK)
Backtrace:0x400832ed:0x3ffe3aa00x40087155:0x3ffe3ac0 0x4008bc65:0x3ffe3ae0 0x400d6796:0x3ffe3c10 0x40082a09:0x3ffe3c40 0x400792ba:0x3ffe3c90 |<-CORRUPTED
ELF file SHA256: 0000000000000000
Rebooting…
ets Jul 29 2019 12:21:46rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, 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 0x400805e4assert failed: do_core_init startup.c:298 (flash_ret == ESP_OK)
Backtrace:0x400832ed:0x3ffe3aa00x40087155:0x3ffe3ac0 0x4008bc65:0x3ffe3ae0 0x400d6796:0x3ffe3c10 0x40082a09:0x3ffe3c40 0x400792ba:0x3ffe3c90 |<-CORRUPTED
ELF file SHA256: 0000000000000000
Rebooting…