Monitor log issue of esp32

gauthamik9
Posts: 5
Joined: Tue Jan 31, 2023 9:39 am

Monitor log issue of esp32

Postby gauthamik9 » Wed Mar 08, 2023 1:28 pm

Hi,
I am using esp wroom 32 evaluation kit.I have flashed the hello world but unable to see the log using idf.py monitor command.
gauthami@gauthami-Latitude-3420:~/esp-idf/examples/get-started/hello_world$ idf.py -p /dev/ttyUSB0 flash
Executing action: flash
Running ninja in directory /home/gauthami/esp-idf/examples/get-started/hello_world/build
Executing "ninja flash"...
[1/5] cd /home/gauthami/esp-idf/examples/get-started/hello_world/build/esp-idf/esptool_py && /home/gauthami/.espressif/python_env/idf5.1_py3.8_env/bin/python /home/gauthami/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 partition --type app /home/gauthami/esp-idf/examples/get-started/hello_world/build/partition_table/partition-table.bin /home/gauthami/esp-idf/examples/get-started/hello_world/build/hello_world.bin
hello_world.bin binary size 0x28460 bytes. Smallest app partition is 0x100000 bytes. 0xd7ba0 bytes (84%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cd /home/gauthami/esp-idf/examples/get-started/hello_world/build/bootloader/esp-idf/esptool_py && /home/gauthami/.espressif/python_env/idf5.1_py3.8_env/bin/python /home/gauthami/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 /home/gauthami/esp-idf/examples/get-started/hello_world/build/bootloader/bootloader.bin
Bootloader binary size 0x6720 bytes. 0x8e0 bytes (8%) free.
[2/3] cd /home/gauthami/esp-idf/components/esptool_py && /usr/bin/cmake -D IDF_PATH=/home/gauthami/esp-idf -D "SERIAL_TOOL=/home/gauthami/.espressif/python_env/idf5.1_py3.8_env/bin/python;;/home/gauthami/esp-idf/components/esptool_py/esptool/esptool.py;--chip;esp32" -D "SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args" -D WORKING_DIRECTORY=/home/gauthami/esp-idf/examples/get-started/hello_world/build -P /home/gauthami/esp-idf/components/esptool_py/run_serial_tool.cmake
esptool esp32 -p /dev/ttyUSB0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.5.1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WDQ6 (revision v1.0)
Features: WiFi, BT, Dual Core, Coding Scheme None
Crystal is 40MHz
MAC: 30:ae:a4:10:95:58
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00007fff...
Flash will be erased from 0x00010000 to 0x00038fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Compressed 26400 bytes to 16483...
Writing at 0x00001000... (50 %)
Writing at 0x000076a0... (100 %)
Wrote 26400 bytes (16483 compressed) at 0x00001000 in 0.7 seconds (effective 287.5 kbit/s)...
Hash of data verified.
Compressed 164960 bytes to 91871...
Writing at 0x00010000... (16 %)
Writing at 0x0001b7f7... (33 %)
Writing at 0x000210ea... (50 %)
Writing at 0x000267c3... (66 %)
Writing at 0x0002cd4f... (83 %)
Writing at 0x000349a2... (100 %)
Wrote 164960 bytes (91871 compressed) at 0x00010000 in 2.3 seconds (effective 572.9 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.1 seconds (effective 465.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Done


gauthami@gauthami-Latitude-3420:~/esp-idf/examples/get-started/hello_world$ idf.py monitor
Executing action: monitor
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting.....
Detecting chip type... ESP32
Running idf_monitor in directory /home/gauthami/esp-idf/examples/get-started/hello_world
Executing "/home/gauthami/.espressif/python_env/idf5.1_py3.8_env/bin/python /home/gauthami/esp-idf/tools/idf_monitor.py -p /dev/ttyUSB0 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 --revision 0 /home/gauthami/esp-idf/examples/get-started/hello_world/build/hello_world.elf -m '/home/gauthami/.espressif/python_env/idf5.1_py3.8_env/bin/python' '/home/gauthami/esp-idf/tools/idf.py'"...
--- idf_monitor on /dev/ttyUSB0 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download

MicroController
Posts: 1710
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Monitor log issue of esp32

Postby MicroController » Thu Mar 09, 2023 6:21 pm

(DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
Looks like your chip is still in firmware download mode when you try to monitor.
If your board has a "BOOT" button, make sure you don't press it when resetting, else the chip will just re-enter firmware download mode instead of running your application. (And don't connect circuitry to any BOOT pin.)
You may be able to flash without touching the BOOT button at all and just let esptool.py control the BOOT and RESET lines, if your board supports that.
There could also be some compatibility issue which prevents correct software control over the BOOT/RESET lines. After flashing, you can try to unplug and re-plug the module to USB, then check if monitoring is possible.

Who is online

Users browsing this forum: Baidu [Spider], MicroController, ok-home and 64 guests