Arduino Due: Cannot find device as of v3.4.0

Hey,
As of PIO v3.4.0 at atmelsam 2.3.0, the Due is not found when uploading:

Auto-detected: COM4
Forcing reset using 1200bps open/close on port COM4
Uploading .pioenvs\default\firmware.bin
No device found on COM4
*** [upload] Error 1

However, there are no problems using the Arduino IDE or on the version of pio I had previously (v3.3.1).

Has anyone else had these problems?
Cheers!

I’ve just tested and it works. Do you use “Programming” port and board = due?

Hey,
Yeah its the programming port. And I have the following in my platformio.ini

[env:default]
platform = atmelsam
framework = arduino
board = due
targets = upload

The funny thing was I uploaded it fine, then noticed I had out of date versions of things, then uploaded again to find this error. This happened on two PCs so far!

edit:
This also happens with a fresh project initialised with platformio init -d ./test_project_due --board due, with a copy of Blink.ino and uploading platformio run -t upload

Do you use PlatformIO IDE or PIO Core(CLI)?

Im using PIO Core on windows 10 on both PCs. I have Atom installed, and have used the IDE previously, but its currently disabled.

Could you try previous version of PIO Core? Please open cmd and paste

pip install "platformio<3.4"
pio --version

hey! yeah that works. I knew there must have been a simple pip command to go back a version but I didnt know what it was. Weird

I’ve just made some improvement

Could you try this build? if it works, I’ll merge to the development branch

pip install -U https://github.com/platformio/platformio-core/archive/feature/upload-issue-sam_due.zip

Hey. Sadly that still gives the same error:

Looking for upload port...
Auto-detected: COM6
Forcing reset using 1200bps open/close on port COM6
Uploading .pioenvs\due\firmware.bin
No device found on COM6
*** [upload] Error 1

This is the output from the older working version:

Looking for upload port...                           
Auto-detected: COM6                                  
Forcing reset using 1200bps open/close on port COM6  
Uploading .pioenvs\due\firmware.bin                  
Atmel SMART device 0x285e0a60 found                  
Erase flash                                          
done in 0.033 seconds                                

So it seems the port is found ok, but maybe if it isnt recognising the device type, the reset bit didnt work?

Could you repeat command from Arduino Due: Cannot find device as of v3.4.0 - #8 by ivankravets ? I’ve just pushed new code.

Success! Thanks very much for fixing that! I wonder why it was working when you tested it?
Thanks again

Thanks a lot for testing! I’ve just created a new branch with a new simple fix. Could you try it out?

pip install -U https://github.com/platformio/platformio-core/archive/feature/samba-due-issue.zip

All seems to be fine my end. Thanks!

I’ve just merged fix to development branch. Could you run pio upgrade. It should be 3.4.1b1. Does it work?

Just tried it, all working fine. Thanks!