Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeeduino XIAO - upload fails at about 50% of the time #193

Open
mightycoco opened this issue May 16, 2022 · 4 comments
Open

Seeeduino XIAO - upload fails at about 50% of the time #193

mightycoco opened this issue May 16, 2022 · 4 comments

Comments

@mightycoco
Copy link

Uploading a cpp project to Seeeduino XIAO failes at about 50% of the time. The bossac executable stops after "Uploading...":

Configuring upload protocol...
AVAILABLE: atmel-ice, blackmagic, jlink, sam-ba
CURRENT: upload_protocol = sam-ba
Looking for upload port...
Auto-detected: COM11
Forcing reset using 1200bps open/close on port COM11
Waiting for the new upload port...
Uploading .pio\build\seeed_xiao\firmware.bin

a working upload looks like this

Configuring upload protocol...
AVAILABLE: atmel-ice, blackmagic, jlink, sam-ba
CURRENT: upload_protocol = sam-ba
Looking for upload port...
Auto-detected: COM11
Forcing reset using 1200bps open/close on port COM11
Waiting for the new upload port...
Uploading .pio\build\seeed_xiao\firmware.bin
Atmel SMART device 0x10010005 found
Erase flash
done in 0.819 seconds

Write 76248 bytes to flash (1192 pages)

[=                             ] 5% (64/1192 pages)
[===                           ] 10% (128/1192 pages)
[====                          ] 16% (192/1192 pages)
[======                        ] 21% (256/1192 pages)
[========                      ] 26% (320/1192 pages)
[=========                     ] 32% (384/1192 pages)
[===========                   ] 37% (448/1192 pages)
[============                  ] 42% (512/1192 pages)
[==============                ] 48% (576/1192 pages)
[================              ] 53% (640/1192 pages)
[=================             ] 59% (704/1192 pages)
[===================           ] 64% (768/1192 pages)
[====================          ] 69% (832/1192 pages)
[======================        ] 75% (896/1192 pages)
[========================      ] 80% (960/1192 pages)
[=========================     ] 85% (1024/1192 pages)
[===========================   ] 91% (1088/1192 pages)
[============================  ] 96% (1152/1192 pages)
[==============================] 100% (1192/1192 pages)
done in 0.570 seconds

Verify 76248 bytes of flash with checksum.
Verify successful
done in 0.094 seconds
CPU reset.

The upload always works if

  • The device was put into programming mode manually (cumbersom as a pin has to be pulled to ground in a sequence)
  • The device was put into programming mode when manually calling "mode com10: BAUD=1200" from the command line

Prior uploading the device is put to programming mode in pioupload.py using TouchSerialPort which works only about 50% of the time.

I never had issues with uploading on my old PC but after having to upgrade to a new workstation, the situation is as described.

@m-r-m-s
Copy link

m-r-m-s commented Aug 17, 2022

@mightycoco thank you for reporting this issue! I thought this was a "quirk" of the XIAO and not related to Platformio. Having to manually put XIAO into bootloader mode with the pins is as you say is very cumbersome! I experience a high upload failure rate quite often as well when using Platformio.

Do you get different / better success rates from Arduino IDE?

@mightycoco
Copy link
Author

@mightycoco thank you for reporting this issue! I thought this was a "quirk" of the XIAO and not related to Platformio. Having to manually put XIAO into bootloader mode with the pins is as you say is very cumbersome! I experience a high upload failure rate quite often as well when using Platformio.

Do you get different / better success rates from Arduino IDE?

Haven't tried using arduino ide lately. But a good point, I need to test out.

Currently I unplug the device and replug after the compiler is done. That way, the upload works more often than not.

The thing is, I've rarely experienced this on my old amd machine. So I guess it has something to do with my hardware configuration.

@m-r-m-s
Copy link

m-r-m-s commented Aug 17, 2022

Haven't tried using arduino ide lately. But a good point, I need to test out.

I will test and see as well and see if there is any differences in success rates.

Currently I unplug the device and replug after the compiler is done. That way, the upload works more often than not.

I'll try that too and see if it works any better for me as well.

The thing is, I've rarely experienced this on my old amd machine. So I guess it has something to do with my hardware configuration.

I am using an older Mac laptop on an older Mac OS (10.14) for reference.

@besi
Copy link

besi commented Jun 15, 2023

I'm experiencing the same problem using the latest PlatformIO. When the upload fails I get the error message:

Forcing reset with 1200bps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants