ctag-fh-kiel / ctag-tbd

CTAG TBD >>to be determined<< an extendible open source Eurorack sound module
Other
141 stars 43 forks source link

idf.py monitor doesn't connect #62

Closed hampa closed 2 years ago

hampa commented 2 years ago

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 commented 2 years ago

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: https://github.com/espressif/esptool/issues/540

hampa commented 2 years ago

Yes, that was it.

Upgrading espressif worked.

Visuelle-Musik commented 2 years ago

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 ;-)