Esp32 serial monitor outputs nothing useful


#1

I upload a simple script to my doit esp32 devkit v.1 which just should output a text repeatedly, but it outputs seemingly random character string.
I tried it at difrent baud rates it did not help
So I tried it e.g. with 9600 baud, databits:8, paraty: none, stoppbits:1
Sorry for my bad english


#2

What exact piece of code are you running and what’s your platformio.ini?


#3

that the platformio.ini

[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 9600

and thats the main.ccp

#include <Arduino.h>
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(“hallo”);
delay(10000);
}

and here is a part of the output


#4

o_O. Do you have multiple COM ports connected to your computer? (i.e., is PIO opening the correct one with COM3?)

Can you try 115200 baud because that’s where some bootloader messages are printed?


#5

with baud 115200 it Looks better


and yes thats the corect com port i am pritty sure


#6

Yes, it continously resets and reboots (rst:0x????? ). Now is the question why. Did you do any board hardware modifications? Can you try connecting it to the computer via a different and shorter USB cable? It might just not be getting enough power.

Does the same happen when programming it with the Arduino IDE?


#7

now it Shows Nothing after i removed the Extension with a 20cm Long wire
and i have not done any hardweare Modifikation
and with the Arduino ide i have not tried it because it did not recognice the board and i found that proscedure to install it painful


#8

Please try with the Arduino IDE. Follow the instructions at https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/boards_manager.md, you just need to add a URL to the board manager and install it via the GUI (no repository cloning etc).

This way we can find out if that’s a general hardware problem. If the Arduino IDE works, PIO is compiling the firmware in a wrong way; If it also doesn’t work, there might a hardware problem (e.g, destroyed by a short-circuit etc.).


#9


yes it worrks so any clue why it does not work in platformio


#10

Which board and other settings did you select in the Arduino IDE? Can you give a screenshot?


#11


#12

Can you go to ‘Werkzeuge’->Flash Frequency and select 80MHz and retry? Does it still work?


#13


yes it still works


#14

Ok I don’t understand this. The Arduino-ESP32 has the following settings: https://github.com/espressif/arduino-esp32/blob/master/boards.txt#L1590-L1641

Which are identical to the PIO settings (https://github.com/platformio/platform-espressif32/blob/develop/boards/esp32doit-devkit-v1.json). CPU speed, flash speed & mode and identical (PIO uses 40MHz for flash freq).

Just to verify: In the VSCode terminal, what does pio --version output? Are any PIO updates available (Alien icon on the left side?)

There’s also the thing that your username contains a space which has caused problems before (but shouldn’t now anymore I guess).

I’ll try flashing my ESP32 with the same platformio.ini and see if I encounter the same problem.


#15


you mean that Version in the midle not that i could see


#16

Yeah you have 3.6.3 core which is the most recent one. Given that, your ESP32 packages should also be up-to-date.

I can flash my " ESP32 DevKitC" board with the board = esp32doit-devkit-v1 setting no-problem (the boards don’t really differ except for maybe the flash mode). Outputting

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (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:0x3fff0018,len:4
load:0x3fff001c,len:952
load:0x40078000,len:6084
load:0x40080000,len:7944
entry 0x40080310
Hello
Hello

Can you disconnect from the COM port in VSCode, then use hterm.exe (http://www.der-hammer.info/terminal/) and connect to the COM port on 115200 baud, then press the reset button? Maybe that program gives more output and shows differences in the flash setup or other things.

And can you please upload the result of a verbose compilation run? (pio run -t clean, then pio run -v -t upload > compileLog.txt in the VSCode terminal, upload compileLog.txt to pastebin.com and share link)


#17

i dont understand the last part but what i get from the programmm as preview Looks promesing


#18

did you meant it like so? but it gave me an eror


#19

This was a screenshot when the Arduino-IDE produced firmware was uploaded on the board or the PIO one?

You have a typo, clear -> clean. The last command uses output redirection into a file (i.e. no output will be displayed in the terminal, you have to wait for the execution to finish).

And you can also set “Newline at” setting to CR + LF


#20

Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: arduino)-------------------------------------------------------------------------------------------------------------------------------------------------
Removed .pioenvs\esp32doit-devkit-v1\firmware.bin
Removed .pioenvs\esp32doit-devkit-v1\firmware.elf
Removed .pioenvs\esp32doit-devkit-v1\libFrameworkArduino.a
Removed .pioenvs\esp32doit-devkit-v1\libFrameworkArduinoVariant.a
Removed .pioenvs\esp32doit-devkit-v1\partitions.bin
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\base64.cpp.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\cbuf.cpp.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\Esp.cpp.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-adc.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-bt.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-dac.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-gpio.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-i2c.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-ledc.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-matrix.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-misc.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-psram.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-sigmadelta.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-spi.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-time.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-timer.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-touch.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\esp32-hal-uart.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\HardwareSerial.cpp.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\IPAddress.cpp.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\IPv6Address.cpp.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\main.cpp.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\MD5Builder.cpp.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\Print.cpp.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\stdlib_noniso.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\Stream.cpp.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\StreamString.cpp.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\wiring_pulse.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\wiring_shift.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\WMath.cpp.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\WString.cpp.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\libb64\cdecode.c.o
Removed .pioenvs\esp32doit-devkit-v1\FrameworkArduino\libb64\cencode.c.o
Removed .pioenvs\esp32doit-devkit-v1\src\main.cpp.o
Done cleaning
========================================================== [SUCCESS] Took 0.88 seconds ==========================================================

than it gave me this

the secound comand still gave an Error

This was a screenshot when the Arduino-IDE produced firmware was uploaded on the board or the PIO one?

and the result was from that upload with platform io