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:
Setup could not be completed.
Please correct the problem and restart the setup. "
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:
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.
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.