I recently switched to VSCode with PIO as my IDE for my Arduino Projects and I´m really happy with it.
However, I have a strange problem since today:
I am using an Arduino Nano and I have some with old and some with new bootloaders. Therefore I have two environments in my .ini File: One for the Mini-Core Bootloader and one for the old Bootloader. And until today this just worked fine, when I clocked “upload” one of them failed and the other one succeeded, depending on which type of Arduino Nano was plugged in to my Computer (via USB).
But since today it gets stuck after trying to upload to the old bootloader.
It shows this:
in the Terminal and does nothing after that.
Until today it would start trying the other Bootloader right after that but now it just freezes and I can´t restart the upload process until I close and open VSCode again.
Any hints how to solve this?
Thanks in Advance
resp=.. messages look to me as if you’re talking to the bootloader at the wrong baudrate. Edit the
platformio.ini to include the line
upload_speed = 57600 in the environment you’re currently working with. Does it work now?
Well actually these resp messages are correct. In this case I have plugged in an Arduino with the MiniCore Bootloader. And now PIO first tries to connect with an Arduino with the old Bootloader which doesn´t work, therefore it shows messages.
But normally (that is until last week or so) after that it would tell me that it FAILED uploading to the Old Bootloader and proceed uploading to the MiniCore Bootloader, which ends up with a SUCCESS.
But now it freezes before even trying to connect with the new bootloader and I can´t do anything until I shutdown and open VSCode again.
If you have two environments, you should be able to chose the correct environment directly. See docs.
But I get your point, PlatformIO shouldn’t just hang up. Can you press the upload button again and wait for, let’s say a minute, and take a screenshot of the whole VSCode window?
sorry for the late reply.
Now I tried again and now it works again as it did before: One of the environments fails and one succeeds. See this picture:
Strangely I cannot reproduce the error where it hangs up after failing the upload to the first environment.
Anyway, thanks for pointing out the button to choose which environment to use. I had it always on default which means to try both environments in my case.