Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idf.py monitor doesn't connect #62

Closed
hampa opened this issue Jun 19, 2022 · 3 comments
Closed

idf.py monitor doesn't connect #62

hampa opened this issue Jun 19, 2022 · 3 comments

Comments

@hampa
Copy link

hampa commented Jun 19, 2022

I'm trying to use the command idf.py flash monitor or just idf.py monitor.

It always fails. I can flash properly but just not monitor.

Any hints on what the problem is?

My binary is too big or something? I've changed so that it loads Void as default.

Writing at 0x0065c000... (100 %)
Wrote 3145728 bytes (324853 compressed) at 0x00610000 in 12.3 seconds (effective 2047.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Executing action: monitor
Running idf_monitor in directory /Users/hampa/code/ctag-tbd
Executing "/Users/hampa/.espressif/python_env/idf4.3_py3.8_env/bin/python /Users/hampa/code/esp/esp-idf/tools/idf_monitor.py -p /dev/tty.usbserial-0001 -b 115200 --toolchain-prefix xtensa-esp32-elf- /Users/hampa/code/ctag-tbd/build/ctag-tbd.elf -m '/Users/hampa/.espressif/python_env/idf4.3_py3.8_env/bin/python' '/Users/hampa/code/esp/esp-idf/tools/idf.py' '-p' '/dev/tty.usbserial-0001'"...
Traceback (most recent call last):
File "/Users/hampa/code/esp/esp-idf/tools/idf_monitor.py", line 51, in
import serial.tools.list_ports
File "/Users/hampa/.espressif/python_env/idf4.3_py3.8_env/lib/python3.8/site-packages/serial/tools/list_ports.py", line 29, in
from serial.tools.list_ports_posix import comports
File "/Users/hampa/.espressif/python_env/idf4.3_py3.8_env/lib/python3.8/site-packages/serial/tools/list_ports_posix.py", line 31, in
from serial.tools.list_ports_osx import comports
File "/Users/hampa/.espressif/python_env/idf4.3_py3.8_env/lib/python3.8/site-packages/serial/tools/list_ports_osx.py", line 32, in
kIOMasterPortDefault = ctypes.c_void_p.in_dll(iokit, "kIOMasterPortDefault")
ValueError: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found
idf_monitor failed with exit code 1

@Visuelle-Musik
Copy link
Collaborator

Visuelle-Musik commented Jun 19, 2022

Seemingly there is a compatibilty issue between the version of OSx you are using the version of espidf / idf.py used.
As described in the error-output by: dlsym(RTLD_DEFAULT, kIOMasterPortDefault): symbol not found

Here is a link, dating back to 2020 which at least describes a possible bypass-solution by changing the call to idf.py as well as commenting out some lines in it:
espressif/esptool#540

@hampa
Copy link
Author

hampa commented Jun 20, 2022

Yes, that was it.

Upgrading espressif worked.

@hampa hampa closed this as completed Jun 20, 2022
@Visuelle-Musik
Copy link
Collaborator

Hi, cool to hear about that. And if everything is working with the new ESP-Toolchain that's perfect of course.
Just one hint on that, I once ran into other problems regarding the ESP IDF Filesystem when using another version.
According to: https://github.com/ctag-fh-kiel/ctag-tbd "git checkout release/v4.1" version 4.1 still is recommended.
So in other words: if you every should run into other problems with that environment you may have to do a fallback and patch idf.py by yourself to make it work. But hopefully of course this will not happen - just saying because of my own experience ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants