A Problem witth VS and PlatformIO IDE

I have VS installed on my PC and I have a problems with it.
I use an “Arduino MKR1000” board. It has two interfaces. A virtual COM and an SWD interface.
When uploading a sketch (hex files) to the board via the interface, an error occurs:

“No device found on COM3”.
My idea, an incorrect interface driver is used during upload.
The cause is in the PlatformIO.ini. “Platform = atmelsam” is specified in this file. This information relates to the SWD interface which I do not want to use.
I want to upload my sketch via the connected virtual USB-COM interface:
“upload_port = COM6”
This virtuel USB Port COM6 works not.
I tried to get help in the suport community regarding my problems. I did not receive an answer.

Another error occurs during the update process:
“C: \ Program Files (x86) \ Microsoft VS Code \ tools \ inno_updater.exe
Error creating a file in the target folder: Access denied. "

I have changed the access rights, now it appears:

"Set up
Access denied.
Setup could not be completed.
Please correct the problem and restart the setup. "

Regards Jurgen

No the Platform value is the microcontroller platform, and “Atmel SAM” is correct since the MKR1000 contains a Atmel SAMW25H18 System on Chip which in turn has the SAMD21 core MCU.

Does it help if you manually boot the chip into bootloader mode by quickly double-pressing the reset button and then press upload?

Hello Maxgerhardt,
Thank you for your response. I will test your hint. I think I have already tested this option with no success.
regards Jurgen

Hello Maxgerhardt,
I’ve tested your hint to no avail. Always the same, the port changes from COM6 to COM3.
regards Jurgen

Can you, as a test, add these two lines in the platformio.ini

board_upload.use_1200bps_touch = no 
board_upload.wait_for_upload_port = no 

and then put the board into bootloader mode again and press upload. The lines should prevent PlatformIO from triggering the serial reset and directly upload.

Hello maxgerhardt,
thank you very much for your answer.
I would like to test your suggestion, but I don’t know how to put the board into bootload mode. The board has a virtual USB-interface (COMX) and an SWD interface.


I have access to the bootloader via the SWD interface. When I upload a user program, I use the USB port.
If the upload is correct via the COM interface, the following USB interface configuration is used:

Configuration COM6

Standard (Wert nicht festgelegt)
Address 0x00000003 (3)
Capabilities 0x00000084 (132)
ClassGUID {4d36e978-e325-11ce-bfc1-08002be10318}
CompatiblelDs USB\Class_02&SubClass_02&Prot_00 USB\Class_02&SubClass_02 USB\Class_02
ConfigFlags 0x00000000 (0)
ContainerlD {b0c2f780-3ec4-11 eb-ac54-c860009f984c}
DeviceDesc ©usbser.inf,%usbserial.devicedesc%;Serielles USB-Gerät
Driver {4d36e978-e325-11ce-bfc1-08002be10318}\0002
FriendlyName Serielles USB-Gerät (COM3)
HardwareID USB\VID_2341 &PID_004E&REV_0200 USB\VID_2341 &PID.004E
Locationinformation Port_#0003.Hub_#0003
MFG ©usbser.inf,%msft%;Microsoft
Service usbser

After converting the interface from PlatformIO to COM3, the following interface is used:

Standard (Wert nicht festgelegt)
Address 0x00000008 (8)
Capabilities 0x00000080(128)
ClassGUID {4d36e978-e325-11ce-bfc1-08002be10318}
CompatiblelDs USB\Class_02&SubClass_02&Prot_00USB\Class_02&SubClass_02USB\Class_02
ConfigFlags 0x00000000 (0)
ContainerlD {e9723852-259e-56af-99eb-b12dacc1dcba}
DeviceDesc ©oem162.inf,%mkr1000.sketch.name%;Arduino MKR1000
Driver {4d36e978-e325-11ce-bfc1-08002be10318}\0003
FriendlyName Arduino MKR1000 (COM6)
HardwareID USB\VID_2341&PID_804E&REV_0100&MI_00USB\VID_2341&PID_804E&MI_00
Locationinformation 0000.001 d.0000.
MFG ©oem162.inf,%manufacturername%;Arduino AG (www.arduino.cc)
Service usbser

The driver for the COM3 interface is presumably intended for the bootload interface (SWD). This driver is loaded by PlatformIO. The user cannot specify that.

Regards Jurgen

You have a misconception there that SWD is used. If you upload via USB and the bootloader that appears when you double-tap the reset button, it’s all via USB, or more precisely, a USB-CDC interface that appears as serial port. “Bootloader mode” is just the mode in which the board is executing the bootloader code after double pressing reset (or after the original USB-CDC interface has been opened at 1200 baud, a special magic opening procedure).

That should also answer this question

The SWD part of the chip is not used as long you do not connect an external SWD programmer like a JLink or STLink to the SWD header of that board. SWD is a transport protocol (Single Wire Debug). It is completely separate from the bootlaoder that runs on the chip and is able to accept new firmwares over USB / Serial. If you’re using that please state so now. This needs extra configuration in the platformio.ini so that it knows which exact debugger probe you’ve connected to the SWD pin header.

Hello MaxGerhardt,
I can operate the board with my J-Link interface perfectly via the SWD interface. I have already tested that and found that the same driver is used as with the COM3 interface.


I have problems uploading via the COM interface and have not yet managed it.
I have to try again.
Just like you described it.
Regards Jurgen

Hm. If you’ve flashed it with a JLink then maybe it has erased the bootloader. Can you for safety burn the bootloader using the Arduino IDE?

Hello MaxGerhard
I’ve tested your advice many, many times with the described Parameter. It did not work.

If the bootloader was damaged, why can I upload sketches with the Arduino IDE at any time?
When I use the Arduino IDE after the fiasco with COM3, the upload works fine. That I do not understand. The Arduino IDE makes the upload correct. PlatfomIO does not.
Regards Jurgen

You’re right I don’t understand that either.

Can you post the log of an upload when you have previously set it into bootloader mode? It should not do the 1200 bps touch and wait for new port now with the last platformio.ini modifications.

If I can’t see anything please post this issue to Issues · platformio/platform-atmelsam · GitHub.

1 Like