Page 1 of 1

GDB cannot open serial ports accessed as COMx, can not get IP address using ethernet example

Posted: Sun Mar 28, 2021 9:38 am
by Dejv99
Hi,
I am using OS Win10, VS Code EPS-IDF extension and Olimex ESP32-PoE (Rev. B) board, and struggling with these two problems.

The first is, that when I flash the ethernet-basic example code from ESP-IDF folder (where I defined power pin for Eth PHY), I get this warning:
GDB cannot open serial ports accessed as COMx, as shown below:

Executing action: monitor
Running idf_monitor in directory c:\users\xstejs30\esp\esp-idf\projects\eth_test
Executing "C:\Users\xstejs30\esp\esp-idf\tools\python_env\idf4.4_py3.8_env\Scripts\python.exe C:\Users\xstejs30\esp\esp-idf\tools/idf_monitor.py -p COM7 -b 115200 --toolchain-prefix xtensa-esp32-elf- c:\users\xstejs30\esp\esp-idf\projects\eth_test\build\eth_test.elf -m 'C:\Users\xstejs30\esp\esp-idf\tools\python_env\idf4.4_py3.8_env\Scripts\python.exe' 'C:\Users\xstejs30\esp\esp-idf\tools\idf.py' '-p' 'COM7'"...
--- WARNING: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM7 instead...
--- idf_monitor on \\.\COM7 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
x�xxx� �x��x��xxx��et.Rչ 8�01��Ғ2:MSH�HH��:0�LB��WE��}I�SE�JI��t:��b�i��FA*�e1ASH%==Q)
�˙�gsi� 0 �A%WP:•�5
c�E��:0��b��dr�'��0,dߖ��0x0�csz���:0x�,h�E��:0x�,w}���:0��j�[��iDI� ��ck�V��2
�+��0x3���030,���6712C!�+��0�00����leK���56�!�+�:0��‚40����i36��H��tr����008�78C�I (26) boot: ESP-IDF v4.4-dev-479-g1067b2870 2nd stage bootloader
I (26) boot: compile time 09:41:39
I (26) boot: chip revision: 1
I (31) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (38) boot.esp32: SPI Speed : 40MHz
I (42) boot.esp32: SPI Mode : DIO
I (47) boot.esp32: SPI Flash Size : 4MB
I (51) boot: Enabling RNG early entropy source...
I (57) boot: Partition Table:
I (60) boot: ## Label Usage Type ST Offset Length
I (68) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (75) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (83) boot: 2 factory factory app 00 00 00010000 00100000
I (90) boot: End of partition table
I (94) boot_comm: chip revision: 1, min. application chip revision: 0
I (101) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=0f354h ( 62292) map
I (132) esp_image: segment 1: paddr=0001f37c vaddr=3ffb0000 size=00c9ch ( 3228) load
I (133) esp_image: segment 2: paddr=00020020 vaddr=400d0020 size=30424h (197668) map
I (207) esp_image: segment 3: paddr=0005044c vaddr=3ffb0c9c size=01cf0h ( 7408) load
I (210) esp_image: segment 4: paddr=00052144 vaddr=40080000 size=0bf88h ( 49032) load
I (240) boot: Loaded app from partition at offset 0x10000
I (240) boot: Disabling RNG early entropy source...
I (251) cpu_start: Pro cpu up.
I (251) cpu_start: Starting app cpu, entry point is 0x40081228
0x40081228: call_start_cpu1 at C:/Users/xstejs30/esp/esp-idf/components/esp_system/port/cpu_start.c:158


The second problem is, that I can't get IP address to ping to my board. I have used ethernet example from Olimex website too, but both examples gave me exactly the same result (below is continuation of previous code):

0x40081228: call_start_cpu1 at C:/Users/xstejs30/esp/esp-idf/components/esp_system/port/cpu_start.c:158

I (0) cpu_start: App cpu up.
I (266) cpu_start: Pro cpu start user code
I (266) cpu_start: cpu freq: 160000000
I (266) cpu_start: Application information:
I (270) cpu_start: Project name: eth_test
I (275) cpu_start: App version: v4.4-dev-479-g1067b2870
I (281) cpu_start: Compile time: Mar 28 2021 09:41:03
I (288) cpu_start: ELF file SHA256: 836b11329089aaf7...
I (293) cpu_start: ESP-IDF: v4.4-dev-479-g1067b2870
I (300) heap_init: Initializing. RAM available for dynamic allocation:
I (307) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (313) heap_init: At 3FFB4268 len 0002BD98 (175 KiB): DRAM
I (319) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (326) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (332) heap_init: At 4008BF88 len 00014078 (80 KiB): IRAM
I (339) spi_flash: detected chip: gd
I (343) spi_flash: flash io: dio
I (348) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (373) system_api: Base MAC address is not set
I (373) system_api: read default base MAC address from EFUSE
I (403) esp_eth.netif.glue: 24:0a:c4:9f:00:37
I (403) esp_eth.netif.glue: ethernet attached to netif
I (413) eth_example: Ethernet Started
I (4413) eth_example: Ethernet Link Up
I (4413) eth_example: Ethernet HW Addr 24:0a:c4:9f:00:37


At the end I should see something like this:
I (394) eth_example: Ethernet Started
I (3934) eth_example: Ethernet Link Up
I (3934) eth_example: Ethernet HW Addr 30:ae:a4:c6:87:5b
I (5864) tcpip_adapter: eth ip: 192.168.2.151, mask: 255.255.255.0, gw: 192.168.2.2
I (5864) eth_example: Ethernet Got IP Address
I (5864) eth_example: ~~~~~~~~~~~
I (5864) eth_example: ETHIP:192.168.2.151
I (5874) eth_example: ETHMASK:255.255.255.0
I (5874) eth_example: ETHGW:192.168.2.2
I (5884) eth_example: ~~~~~~~~~~~


I will be very grateful for any advice.

Re: GDB cannot open serial ports accessed as COMx, can not get IP address using ethernet example

Posted: Mon May 08, 2023 11:08 am
by esp776
Hi,

have you fixed this problem? I have the same problem.

Re: GDB cannot open serial ports accessed as COMx, can not get IP address using ethernet example

Posted: Mon May 08, 2023 2:35 pm
by HeltonHPontes
I had a similar problem.
In my case, the ESP-IDF Monitor baud rate was wrong.
I just fixed the baud rate to 115200.

Re: GDB cannot open serial ports accessed as COMx, can not get IP address using ethernet example

Posted: Tue May 09, 2023 1:22 pm
by FizzBuzz0
Add this:

Code: Select all

  "idf.monitorBaudRate": "115200",
  "idf.flashBaudRate": "921600",
in the settings.json file.