0

Unable to upload sketch
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Unable to upload sketch

by tcwalker5 on Mon Jun 24, 2019 2:39 pm

I've been uploading sketches for over a week on an Adafruit Feather M0. I'm using the latest Mac Arduino IDE.

All of a sudden, I am not able to upload anymore. It seems that during the upload process the serial port disappears. As you can see in the screen capture, the port is active after pressing the reset button twice. But then after several seconds into the process, an error pops up indicating that the port is missing. I tried using other boards (Adafruit Feather M0 with WiFi) and the same thing happens.

I am able to load the blink sketch however on the same board and all settings the same.

I don't know where to go next. Any suggestions?
Thanks.

in the log below I see that the port was found
Code: Select all | TOGGLE FULL SIZE
Found upload port: /dev/cu.usbmodem143101


Full log here:
Code: Select all | TOGGLE FULL SIZE
Arduino: 1.8.9 (Mac OS X), Board: "Adafruit Feather M0, Arduino, Off"

Sketch uses 28364 bytes (10%) of program storage space. Maximum is 262144 bytes.
Forcing reset using 1200bps open/close on port /dev/cu.usbmodem143101
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.AirPods-WirelessiAP-2, /dev/cu.usbmodem143101, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.AirPods-WirelessiAP-2, /dev/tty.usbmodem143101, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.AirPods-WirelessiAP-2, /dev/cu.usbmodem143101, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.AirPods-WirelessiAP-2, /dev/tty.usbmodem143101, } => {}
PORTS {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.TedsAirPods-WirelessiAP-2, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.TedsAirPods-WirelessiAP-2, } / {/dev/cu.Bluetooth-Incoming-Port, /dev/cu.TedsAirPods-WirelessiAP-2, /dev/cu.usbmodem143101, /dev/tty.Bluetooth-Incoming-Port, /dev/tty.TedsAirPods-WirelessiAP-2, /dev/tty.usbmodem143101, } => {/dev/cu.usbmodem143101, /dev/tty.usbmodem143101, }
Found upload port: /dev/cu.usbmodem143101
/Users/home/Library/Arduino15/packages/arduino/tools/bossac/1.7.0/bossac -i -d --port=cu.usbmodem143101 -U true -i -e -w -v /var/folders/v7/rh0klmj11nq1gdwz2f_624200000gn/T/arduino_build_220802/featherwing.v2.ino.bin -R
Set binary mode
readWord(addr=0)=0x20002dd8
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
version()=v1.1 [Arduino:XYZ] May 12 2018 18:17:10
chipId=0x10010005
Connected at 921600 baud
readWord(addr=0)=0x20002dd8
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Atmel SMART device 0x10010005 found
write(addr=0x20004000,size=0x34)
writeWord(addr=0x20004030,value=0x10)
writeWord(addr=0x20004020,value=0x20008000)
Device       : ATSAMD21G18A
readWord(addr=0)=0x20002dd8
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Chip ID      : 10010005
version()=v1.1 [Arduino:XYZ] May 12 2018 18:17:10
Version      : v1.1 [Arduino:XYZ] May 12 2018 18:17:10
Address      : 8192
Pages        : 3968
Page Size    : 64 bytes
Total Size   : 248KB
Planes       : 1
Lock Regions : 16
Locked       : readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
none
readWord(addr=0x41004018)=0
Security     : false
Boot Flash   : true
readWord(addr=0x40000834)=0x7000a
BOD          : true
readWord(addr=0x40000834)=0x7000a
BOR          : true
Arduino      : FAST_CHIP_ERASE
Arduino      : FAST_MULTI_PAGE_WRITE
Arduino      : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
chipErase(addr=0x2000)
done in 0.662 seconds

Write 28636 bytes to flash (448 pages)
write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x2000, size=0x1000)

[====                          ] 14% (64/448 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x3000, size=0x1000)

[========                      ] 28% (128/448 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x4000, size=0x1000)

[============                  ] 42% (192/448 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x5000, size=0x1000)

[=================             ] 57% (256/448 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x6000, size=0x1000)

[=====================         ] 71% (320/448 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x7000, size=0x1000)

[=========================     ] 85% (384/448 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x8000, size=0x1000)

[==============================] 100% (448/448 pages)
done in 0.167 seconds

Verify 28636 bytes of flash with checksum.
checksumBuffer(start_addr=0x2000, size=0x1000) = ac48
checksumBuffer(start_addr=0x3000, size=0x1000) = 9d77
checksumBuffer(start_addr=0x4000, size=0x1000) = d4da
checksumBuffer(start_addr=0x5000, size=0x1000) = f83f
checksumBuffer(start_addr=0x6000, size=0x1000) = 3dc0
checksumBuffer(start_addr=0x7000, size=0x1000) = abd2
checksumBuffer(start_addr=0x8000, size=0xfdc) = 1fac
Verify successful
done in 0.039 seconds
CPU reset.
readWord(addr=0)=0x20002dd8
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
writeWord(addr=0xe000ed0c,value=0x5fa0004)
Couldn't find a Board on the selected port. Check that you have the correct port selected.  If it is correct, try pressing the board's reset button after initiating the upload.
processing.app.SerialException: Error opening serial port '/dev/cu.usbmodem143101'.
   at processing.app.Serial.<init>(Serial.java:147)
   at processing.app.Serial.<init>(Serial.java:82)
   at processing.app.SerialMonitor$4.<init>(SerialMonitor.java:101)
   at processing.app.SerialMonitor.open(SerialMonitor.java:101)
   at processing.app.AbstractMonitor.resume(AbstractMonitor.java:104)
   at processing.app.Editor.resumeOrCloseSerialMonitor(Editor.java:2126)
   at processing.app.Editor.access$1300(Editor.java:115)
   at processing.app.Editor$UploadHandler.run(Editor.java:2104)
   at java.lang.Thread.run(Thread.java:748)
Caused by: jssc.SerialPortException: Port name - /dev/cu.usbmodem143101; Method name - openPort(); Exception type - Port not found.
   at jssc.SerialPort.openPort(SerialPort.java:167)
   at processing.app.Serial.<init>(Serial.java:136)
   ... 8 more
Error opening serial port '/dev/cu.usbmodem143101'.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.



Port.jpg
Port is visible to Arduino IDE
Port.jpg (71.74 KiB) Viewed 153 times

IMG_0266.jpg
Adafruit Feather M0 Basic Proto
IMG_0266.jpg (520.3 KiB) Viewed 153 times

IMG_0268.jpg
Adafruit Feather M0 WiFi with Adafruit TFT Featherwing
IMG_0268.jpg (278.57 KiB) Viewed 153 times

tcwalker5
 
Posts: 3
Joined: Fri May 03, 2019 4:05 am

Re: Unable to upload sketch

by adafruit_support_carter on Mon Jun 24, 2019 8:03 pm

Can you clarify what is happening between the blink sketch and your other sketch. It sounds like everything works fine with the blink sketch? The port issue is only happening with uploading your other sketch?

adafruit_support_carter
 
Posts: 12966
Joined: Tue Nov 29, 2016 2:45 pm

Re: Unable to upload sketch

by tcwalker5 on Tue Jun 25, 2019 1:45 pm

Thanks for taking the time to consider my problem. It turns out that a line of code was accidentally placed in the wrong spot. Removing that line resolved the problem.

For folks looking at this thread in the future, it was user error and not a problem.

tcwalker5
 
Posts: 3
Joined: Fri May 03, 2019 4:05 am

Please be positive and constructive with your questions and comments.


cron