Closed dylancaponi closed 5 years ago
Solution was to run:
pio lib install 562
Now getting Error: Please specify `upload_port` for environment or use global `--upload-port` option.
To find the port, unplug device. Wait and run:
ls -lha /dev/tty* > unplugged.txt
Then plug in device. Wait and run:
ls -lha /dev/tty* > plugged.txt
Diff the files to find the port:
diff unplugged.txt plugged.txt
Eg: > crw--w---- 1 dc tty 16, 3 Apr 4 01:22 /dev/ttys003
Then run:
pio run -t upload --upload-port /dev/ttys003
Which still fails with: Inappropriate ioctl for device
Stack trace:
Configuring upload protocol...
AVAILABLE: esp-prog, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Use manually specified: /dev/ttys004
Uploading .pioenvs/m5stack-core-esp32/firmware.bin
esptool.py v2.6
Serial port /dev/ttys004
Traceback (most recent call last):
Connecting...
File "/Users/dc/.platformio/packages/tool-esptoolpy/esptool.py", line 2959, in <module>
_main()
File "/Users/dc/.platformio/packages/tool-esptoolpy/esptool.py", line 2952, in _main
main()
File "/Users/dc/.platformio/packages/tool-esptoolpy/esptool.py", line 2653, in main
esp.connect(args.before)
File "/Users/dc/.platformio/packages/tool-esptoolpy/esptool.py", line 460, in connect
last_error = self._connect_attempt(mode=mode, esp32r0_delay=False)
File "/Users/dc/.platformio/packages/tool-esptoolpy/esptool.py", line 418, in _connect_attempt
self._setDTR(False) # IO0=HIGH
File "/Users/dc/.platformio/packages/tool-esptoolpy/esptool.py", line 384, in _setDTR
self._port.setDTR(state)
File "/usr/local/Cellar/platformio/3.6.6/libexec/lib/python2.7/site-packages/serial/serialutil.py", line 599, in setDTR
self.dtr = value
File "/usr/local/Cellar/platformio/3.6.6/libexec/lib/python2.7/site-packages/serial/serialutil.py", line 469, in dtr
self._update_dtr_state()
File "/usr/local/Cellar/platformio/3.6.6/libexec/lib/python2.7/site-packages/serial/serialposix.py", line 636, in _update_dtr_state
fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_DTR_str)
IOError: [Errno 25] Inappropriate ioctl for device
*** [upload] Error 1
When running
pio run -t upload