Heltec Wifi Kit 32 - Project does not use /dev/cu.SLAB_USBtoUART

Hello,

I am trying to install Zerynth OS on my Heltec WiFi kit 32 using my Macbook (Catalina).

Unfortunately, each time I try to write the OS, Zerynth Studio defaults to the wrong serial port.

It should use /dev/cu.SLAB_USBtoUART (I manually set it to that).

Instead it uses /dev/cu.usbserial-0001 which is the wrong port; you have to use UART for this device.

I tracked the bug down to a misconfiguration in project.yml

In the YAML file, the correct port is ALWAYS overwritten with the WRONG port.

What do I need to do to get this to work?

Here is the stack trace:

[warning] Trying to search attached device

[info] Preparing heltec_wifikit32

[info] Rewriting /Users/derrick/.zerynth2/tmp/heltec_wifikit32/project.yml

[warning] Trying to get latest available vm

{'rtos': 'esp32-rtos', 'version': 'r20.07.07', 'features': [], 'description': 'Standard', 'xfeatures': [], 'target': 'heltec_wifikit32'}

[info] Rewriting /Users/derrick/.zerynth2/tmp/heltec_wifikit32/project.yml

[info] Burning bootloader...

[info] Burning bin

[info] esptool.py v2.0

[info] Traceback (most recent call last):

[info]   File "/Users/derrick/.zerynth2/sys/python/lib/python3.5/site-packages/serial/serialposix.py", line 289, in open

[info]     self.fd = os.open(self.portstr, os.O_RDWR|os.O_NOCTTY|os.O_NONBLOCK)

[info] OSError: [Errno 16] Resource busy: '/dev/tty.usbserial-0001'

[info] 

[info] During handling of the above exception, another exception occurred:

[info] 

[info] Traceback (most recent call last):

[info]   File "/Users/derrick/.zerynth2/dist/r2.6.0/sys/esptool/esp32/esptool.py", line 2405, in 

[info]     _main()

[info]   File "/Users/derrick/.zerynth2/dist/r2.6.0/sys/esptool/esp32/esptool.py", line 2398, in _main

[info]     main()

[info]   File "/Users/derrick/.zerynth2/dist/r2.6.0/sys/esptool/esp32/esptool.py", line 2127, in main

[info]     esp = chip_class(args.port, initial_baud)

[info]   File "/Users/derrick/.zerynth2/dist/r2.6.0/sys/esptool/esp32/esptool.py", line 175, in __init__

[info]     self._port = serial.serial_for_url(port)

[info]   File "/Users/derrick/.zerynth2/sys/python/lib/python3.5/site-packages/serial/__init__.py", line 78, in serial_for_url

[info]     instance.open()

[info]   File "/Users/derrick/.zerynth2/sys/python/lib/python3.5/site-packages/serial/serialposix.py", line 292, in open

[info]     raise SerialException(msg.errno, "could not open port %s: %s" % (self._port, msg))

[info] serial.serialutil.SerialException: [Errno 16] could not open port /dev/tty.usbserial-0001: [Errno 16] Resource busy: '/dev/tty.usbserial-0001'

[error] Can't burn bootloader! --> esptool.py v2.0

Traceback (most recent call last):

  File "/Users/derrick/.zerynth2/sys/python/lib/python3.5/site-packages/serial/serialposix.py", line 289, in open

    self.fd = os.open(self.portstr, os.O_RDWR|os.O_NOCTTY|os.O_NONBLOCK)

OSError: [Errno 16] Resource busy: '/dev/tty.usbserial-0001'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/Users/derrick/.zerynth2/dist/r2.6.0/sys/esptool/esp32/esptool.py", line 2405, in 

    _main()

  File "/Users/derrick/.zerynth2/dist/r2.6.0/sys/esptool/esp32/esptool.py", line 2398, in _main

    main()

  File "/Users/derrick/.zerynth2/dist/r2.6.0/sys/esptool/esp32/esptool.py", line 2127, in main

    esp = chip_class(args.port, initial_baud)

  File "/Users/derrick/.zerynth2/dist/r2.6.0/sys/esptool/esp32/esptool.py", line 175, in __init__

    self._port = serial.serial_for_url(port)

  File "/Users/derrick/.zerynth2/sys/python/lib/python3.5/site-packages/serial/__init__.py", line 78, in serial_for_url

    instance.open()

  File "/Users/derrick/.zerynth2/sys/python/lib/python3.5/site-packages/serial/serialposix.py", line 292, in open

    raise SerialException(msg.errno, "could not open port %s: %s" % (self._port, msg))

serial.serialutil.SerialException: [Errno 16] could not open port /dev/tty.usbserial-0001: [Errno 16] Resource busy: '/dev/tty.usbserial-0001'

Okay, after much trial and error, I figure it out.

I did not upload the Zerynth Virtual Machine to the device. That is a very embarrassing mistake, but the documentation is also very unclear about the necessity of that step!