อาการนี้ผมใช้บอร์ด ESP32 ขณะกำลังอัพโหลด ก็ขึ้น error ตามด้านล่าง วิธีแก้ของผมก็คือขยับ สายเสียบ USB ใหม่ก็สามารถใช้งานได้ปกติครับ
Uploading...
esptool.py v2.6
Serial port COM9
Traceback (most recent call last):
File "esptool.py", line 2959, in <module>
File "esptool.py", line 2952, in _main
File "esptool.py", line 2652, in main
File "esptool.py", line 222, in __init__
File "site-packages\serial\__init__.py", line 88, in serial_for_url
File "site-packages\serial\serialwin32.py", line 62, in open
serial.serialutil.SerialException: could not open port 'COM9': WindowsError(2, 'The system cannot find the file specified.')
Failed to execute script esptool
An error occurred while uploading the sketch
หลังขยับและเลือก comport ใหม่
Serial port COM9
Traceback (most recent call last):
File "esptool.py", line 2959, in <module>
File "esptool.py", line 2952, in _main
File "esptool.py", line 2652, in main
File "esptool.py", line 222, in __init__
File "site-packages\serial\__init__.py", line 88, in serial_for_url
File "site-packages\serial\serialwin32.py", line 62, in open
serial.serialutil.SerialException: could not open port 'COM9': WindowsError(2, 'The system cannot find the file specified.')
Failed to execute script esptool
An error occurred while uploading the sketch
[Error] Exit with code=1
[Starting] Upload sketch - Test_soilwatch10\Test_soilwatch10.ino
[Warning] Output path is not specified. Unable to reuse previously compiled files. Upload could be slow. See README.
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
Sketch uses 213604 bytes (16%) of program storage space. Maximum is 1310720 bytes.
Global variables use 15328 bytes (4%) of dynamic memory, leaving 312352 bytes for local variables. Maximum is 327680 bytes.
Uploading...
esptool.py v2.6
Serial port COM9
Connecting........_
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, Coding Scheme None
MAC: 30:ae:a4:47:8a:44
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4369.0 kbit/s)...
Hash of data verified.
Compressed 15552 bytes to 10150...
Writing at 0x00001000... (100 %)
Wrote 15552 bytes (10150 compressed) at 0x00001000 in 0.9 seconds (effective 137.0 kbit/s)...
Hash of data verified.
Compressed 213712 bytes to 109712...
Writing at 0x00010000... (14 %)
Writing at 0x00014000... (28 %)
Writing at 0x00018000... (42 %)
Writing at 0x0001c000... (57 %)
Writing at 0x00020000... (71 %)
Writing at 0x00024000... (85 %)
Writing at 0x00028000... (100 %)
Wrote 213712 bytes (109712 compressed) at 0x00010000 in 9.8 seconds (effective 175.4 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 1024.0 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...